Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
huh?  where did the . come from in my $PATH????
- X-seq: zsh-users 2303
 
- From: TjL <tjlists@xxxxxxxxxxx>
 
- To: Zsh Users <zsh-users@xxxxxxxxxxxxxx>
 
- Subject: huh?  where did the . come from in my $PATH????
 
- Date: Wed, 14 Apr 1999 09:24:43 -0400 (EDT)
 
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
 
- Sender: TjL <tjlists@xxxxxxxxxxx>
 
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