aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-07-31 10:33:54 +1000
committerGravatar axel <axel@liljencrantz.se>2006-07-31 10:33:54 +1000
commitf439c4a4840f1a2863064915e09beb54ef86c9c5 (patch)
tree9e565ad5653f0966544051aeddb4ca06ffc23d48 /share
parent2fba53b113a11bc401addf461f584307948849ef (diff)
Make calls to grep Posix compliant
darcs-hash:20060731003354-ac50b-5916d6d862fe8b4f31b64840296d24615b52d175.gz
Diffstat (limited to 'share')
-rw-r--r--share/fish.in9
1 files changed, 4 insertions, 5 deletions
diff --git a/share/fish.in b/share/fish.in
index ccf9ca37..df3433bc 100644
--- a/share/fish.in
+++ b/share/fish.in
@@ -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