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

Re: ~/.zshenv or ~/.zprofile



I'd like to change the StartupFiles/zshenv file so that it doesn't
recommend setting the "path".  How about something like the attached
patch?

..wayne..
--- StartupFiles/zshenv	25 Mar 2001 23:41:02 -0000	1.2
+++ StartupFiles/zshenv	7 Sep 2003 17:54:42 -0000
@@ -1,20 +1,18 @@
 #
-# Generic .zshenv file for zsh 2.7
+# Generic .zshenv file for zsh
 #
-# .zshenv is sourced on all invocations of the
-# shell, unless the -f option is set.  It should
-# contain commands to set the command search path,
-# plus other important environment variables.
-# .zshenv should not contain commands that product
-# output or assume the shell is attached to a tty.
+# .zshenv is sourced on ALL invocations of the shell, unless the -f option is
+# set.  It should NOT contain commands to set the command search path, or other
+# important environment variables unless you really know what you're doing.
+# E.g. running "PATH=/custom/path gdb program" sources this file (when gdb runs
+# the program via $SHELL), so you don't want to override a custom environment
+# in such cases.  Note also that .zshenv should not contain commands that
+# product output or assume the shell is attached to a tty.
 #
 
 # 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
 
-export X11HOME=/usr/X11
-
-path=($X11HOME/bin)
-path=($path /usr/ucb /usr/bin /usr/etc)
-path=($path /usr/local/bin)
-path=($path ~ .)
+# This kludge makes sure that certain /etc/z* files can't set aliases for rm,
+# mv, etc.  Just be sure to put "unalias alias" in your own rc file(s).
+alias alias=:


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