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

huh? where did the . come from in my $PATH????



I have this automatic $PATH maker in .zshenv:

unset PATH

for i in \
          /etc                     \
          /usr                     \
          /bin                     \
          /sbin                    \
          /usr/etc                 \
          /usr/ucb                 \
          /usr/bin                 \
          /usr/gnu/bin             \
          /usr/local/etc           \
          /usr/local/bin           \
          /usr/local/sbin          \
          /usr/local/gnu/bin       \
          /usr/local/shell-scripts \
          $HOME/Library/bin        \
          $HOME/bin                \
          $HOME/Unix/bin                     
do

         if [ -d "$i" ]; then
            PATH=$i:$PATH
	 fi   
done


Which works niftily, except that at the end of the $PATH is "." !!

See:

# echo $PATH
/usr/local/Users/fpc/Unix/bin:/usr/local/shell-scripts:/usr/local/gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/local/etc:/usr/gnu/bin:/usr/bin:/usr/ucb:/usr/etc:/bin:/usr:/etc:.


Now I don't know where that "." came from, but it really really should not
be there!  In fact, I'd almost recommend a "REFUSE_DOT_IN_PATH" option
when compiling zsh!!! (force ./ if you want to execute a command in $PWD
if $PWD is not in $PATH

Any clues what is going wrong?  This is w/ an older version of zsh... I
don't even know where to get the recent versions now with the patches and
whatnot...

TjL






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