mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Make calls to grep Posix compliant
darcs-hash:20060731003354-ac50b-5916d6d862fe8b4f31b64840296d24615b52d175.gz
This commit is contained in:
parent
2fba53b113
commit
f439c4a484
1 changed files with 4 additions and 5 deletions
|
@ -55,11 +55,10 @@ end
|
|||
|
||||
# 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 tmp (printf "%s" \^$PATH'/?$|')
|
||||
set -l path_regexp \((echo $tmp | 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 -E -v $path_regexp)
|
||||
if test -d $i
|
||||
set PATH $PATH $i
|
||||
end
|
||||
|
@ -109,7 +108,7 @@ end
|
|||
# Completions for the shell and it's builtin commands and functions
|
||||
#
|
||||
|
||||
for i in (builtin -n|grep -v '\(while\|for\|if\|function\|switch\)' )
|
||||
for i in (builtin -n|grep -E -v '(while|for|if|function|switch)' )
|
||||
complete -c $i -s h -l help -d "Display help and exit"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue