diff --git a/init/completions/kill.fish b/init/completions/kill.fish index 46627457c..8e5f7013b 100644 --- a/init/completions/kill.fish +++ b/init/completions/kill.fish @@ -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) diff --git a/init/completions/make.fish b/init/completions/make.fish index 2b932cda4..7427fdebc 100644 --- a/init/completions/make.fish +++ b/init/completions/make.fish @@ -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" diff --git a/init/completions/modprobe.fish b/init/completions/modprobe.fish index 1b0395ecf..566d00b6b 100644 --- a/init/completions/modprobe.fish +++ b/init/completions/modprobe.fish @@ -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" diff --git a/init/completions/umount.fish b/init/completions/umount.fish index 489a392bd..4ba33a8d9 100644 --- a/init/completions/umount.fish +++ b/init/completions/umount.fish @@ -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" diff --git a/init/fish_function.fish b/init/fish_function.fish index c49b17129..1ba63bb1e 100644 --- a/init/fish_function.fish +++ b/init/fish_function.fish @@ -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