Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Invocation of zshenv

On Jan 17, 10:23am, Florian Lindner wrote:
} So [/etc/profile] sets and exports the PATH but does not take a
} already set PATH variable into account. If .zshenv is sourced before
} /etc/profile that would explain it. But why only on SSH shells not on
} usual shells?

How do you typically create a "usual shell"?  Log in on console, or
open a terminal window on a graphical desktop?

If the latter, it's possible that ssh shells are being invoked as
login shells whereas "usual" shells are not.  This will depend on the
configuration of the terminal emulator.

Try putting

    setopt NO_GLOBAL_RCS

in your .zshenv to see if that suppresses /etc/profile.  However, you
may not want that in general, depending on what other environment the
global init files are establishing for you.  Instead you may simply
need to reset the path again in a later file.

I put my path-setting logic in an extra file which is "source"d from
both .zshenv and .zlogin (first and last files sourced at startup).
This also has the advantage of making it easier to customize the path
to each local host.

Messages sorted by: Reverse Date, Date, Thread, Author