Minor change to the strings to a printf comman, since it seems to work differently under different platforms

darcs-hash:20060530091417-ac50b-4eead9f39433b54ab66dea1c336b533689d85c46.gz
This commit is contained in:
axel 2006-05-30 19:14:17 +10:00
parent 6a5f11879b
commit 25365dbc54

View file

@ -40,10 +40,11 @@ if test "$USER" = root
set path_list $path_list /sbin /usr/sbin /usr/local/sbin set path_list $path_list /sbin /usr/sbin /usr/local/sbin
end end
# Make a regular expressin that matches any component in the PATH. A # Make a regular expression that matches any component in the PATH. A
# trailing slash is ok. The sed call is to remove the last '\|'. # trailing slash is ok. The sed call is to remove the last '\|'.
set -l path_regexp \\\((printf "^%s\\(\\|/\\)\$\\|" $PATH | sed -e "s/..\$//")\\\)
set -l path_regexp \\\((printf "%s" \^$PATH'\(\|/\)$\|' | sed -e "s/..\$//")\\\)
for i in (printf "%s\n" $path_list|grep -v $path_regexp) for i in (printf "%s\n" $path_list|grep -v $path_regexp)
if test -d $i if test -d $i