mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
Improved the comments to no longer suggest that setting PATH here is
a safe thing to do (though I do provide a safe way to do that if the user really insists on it).
This commit is contained in:
parent
b26ec00df5
commit
cd084812df
1 changed files with 23 additions and 12 deletions
|
@ -1,20 +1,31 @@
|
||||||
#
|
#
|
||||||
# Generic .zshenv file for zsh 2.7
|
# Generic .zshenv file for zsh
|
||||||
#
|
#
|
||||||
# .zshenv is sourced on all invocations of the
|
# .zshenv is sourced on ALL invocations of the shell, unless the -f option is
|
||||||
# shell, unless the -f option is set. It should
|
# set. It should NOT normally contain commands to set the command search path,
|
||||||
# contain commands to set the command search path,
|
# or other common environment variables unless you really know what you're
|
||||||
# plus other important environment variables.
|
# doing. E.g. running "PATH=/custom/path gdb program" sources this file (when
|
||||||
# .zshenv should not contain commands that product
|
# gdb runs the program via $SHELL), so you want to be sure not to override a
|
||||||
# output or assume the shell is attached to a tty.
|
# custom environment in such cases. Note also that .zshenv should not contain
|
||||||
|
# commands that produce output or assume the shell is attached to a tty.
|
||||||
#
|
#
|
||||||
|
|
||||||
# THIS FILE IS NOT INTENDED TO BE USED AS /etc/zshenv, NOR WITHOUT EDITING
|
# THIS FILE IS NOT INTENDED TO BE USED AS /etc/zshenv, NOR WITHOUT EDITING
|
||||||
return 0 # Remove this line after editing this file as appropriate
|
return 0 # Remove this line after editing this file as appropriate
|
||||||
|
|
||||||
export X11HOME=/usr/X11
|
# This kludge can be used to override some installations that put aliases for
|
||||||
|
# rm, mv, etc. into the system profiles. Just be sure to put "unalias alias"
|
||||||
|
# in your own rc file(s) if you use this.
|
||||||
|
alias alias=:
|
||||||
|
|
||||||
path=($X11HOME/bin)
|
# Some people insist on setting their PATH here to affect things like ssh.
|
||||||
path=($path /usr/ucb /usr/bin /usr/etc)
|
# Those that do should probably use $SHLVL to ensure that this only happens
|
||||||
path=($path /usr/local/bin)
|
# the first time the shell is started (to avoid overriding a customized
|
||||||
path=($path ~ .)
|
# environment). Also, the various profile/rc/login files all get sourced
|
||||||
|
# *after* this file, so they will override this value. One solution is to
|
||||||
|
# put your path-setting code into a file named .zpath, and source it from
|
||||||
|
# both here (if we're not a login shell) and from the .zprofile file (which
|
||||||
|
# is only sourced if we are a login shell).
|
||||||
|
if [[ $SHLVL == 1 && ! -o LOGIN ]]; then
|
||||||
|
source ~/.zpath
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue