Do not use GNU -r switch for sed

darcs-hash:20051220085820-ac50b-c46216c3eff88eab9776e5505de1f25e0e046cfc.gz
This commit is contained in:
axel 2005-12-20 18:58:20 +10:00
parent 9ce93164bb
commit cdbd233e62
5 changed files with 8 additions and 8 deletions

View file

@ -7,7 +7,7 @@ if kill -L ^/dev/null >/dev/null
complete -c kill -s L -d "List codes and names of available signals"
set -- signals (kill -L | sed -r 's/([0-9]+) +([A-Z,0-9]+)/\1 \2\n/g;s/ +/ /g' | sed 's/^ //' | grep -E '^[^ ]+')
set -- signals (kill -L | sed -e 's/\([0-9][0-9]*\) *([A-Z,0-9][A-Z,0-9]*\)/\1 \2\n/g;s/ +/ /g' | sed -e 's/^ //' | grep -E '^[^ ]+')
for i in $signals
set -- number (echo $i | cut -d " " -f 1)
set -- name (echo $i | cut -d " " -f 2)

View file

@ -2,7 +2,7 @@
function __fish_print_make_targets
set files Makefile makefile GNUmakefile
grep -h -E '^[^#%=$[:space:]][^#%=$]*:([^=]|$)' $files | cut -d ":" -f 1 | sed -r 's/^ *//;s/ *$//;s/ +/\n/g' ^/dev/null
grep -h -E '^[^#%=$[:space:]][^#%=$]*:([^=]|$)' $files | cut -d ":" -f 1 | sed -e 's/^ *//;s/ *$//;s/ */\n/g' ^/dev/null
end
complete -x -c make -a "(__fish_print_make_targets)" -d "Target"

View file

@ -2,7 +2,7 @@
# Completions for the modprobe command
#
complete -c modprobe -d Module -a "(/sbin/modprobe -l | sed -re 's/\/.*\/([^\/.]*).*/\1/')"
complete -c modprobe -d Module -a "(/sbin/modprobe -l | sed -e 's/\/.*\/\([^\/.]*\).*/\1/')"
complete -c modprobe -s v -l verbose -d "Print messages about what the program is doing"
complete -c modprobe -s C -l config -d "Configuration file" -r
complete -c modprobe -s c -l showconfig -d "Dump configuration file"

View file

@ -10,7 +10,7 @@ complete -y mount
#
# Find all mountpoints
#
complete -c umount -d "Mount point" -x -a '(cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -re "s/[0-9\.]*:\//\//"|grep "^/")'
complete -c umount -d "Mount point" -x -a '(cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -e "s/[0-9\.]*:\//\//"|grep "^/")'
complete -c umount -s V -d "Display version and exit"
complete -c umount -s h -d "Display help and exit"

View file

@ -218,9 +218,9 @@ end
function prompt_pwd -d "Print the current working directory, shortend to fit the prompt"
set -l wd (pwd)
printf "%s" $wd|sed -re 's-/([^/])([^/]*)-/\1-g'
printf "%s" $wd|sed -e 's-/\([^/]\)\([^/]*\)-/\1-g'
if test $wd != '~'
printf "%s\n" $wd|sed -re 's-.*/[^/]([^/]*$)-\1-'
printf "%s\n" $wd|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
end
end
@ -229,7 +229,7 @@ end
#
function pwd -d "Print working directory"
command pwd | sed -re "s|^$HOME|~|"
command pwd | sed -e "s|^$HOME|~|"
end
#
@ -661,7 +661,7 @@ function trap -d 'Perform an action when the shell recives a signal'
if count $opt >/dev/null
set -- names $opt
else
set -- names (functions -na|grep "^__trap_handler_"|sed -re 's/__trap_handler_//' )
set -- names (functions -na|grep "^__trap_handler_"|sed -e 's/__trap_handler_//' )
end
for i in $names