mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 08:56:43 +08:00
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:
parent
6a5f11879b
commit
25365dbc54
|
@ -40,10 +40,11 @@ if test "$USER" = root
|
|||
set path_list $path_list /sbin /usr/sbin /usr/local/sbin
|
||||
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 '\|'.
|
||||
|
||||
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)
|
||||
if test -d $i
|
||||
|
|
Loading…
Reference in New Issue
Block a user