From 95d68e48f23e497f3b9e5df352101d3dc8759ea0 Mon Sep 17 00:00:00 2001 From: axel Date: Fri, 13 Jan 2006 11:02:45 +1000 Subject: [PATCH] Fix the __fish_append shellscript function, as well as some completion bugs in gpg and mount darcs-hash:20060113010245-ac50b-9780d63c65c73f2d61247cce484549ad3561fb74.gz --- init/completions/functions.fish | 2 +- init/completions/mount.fish | 2 +- init/fish_complete.fish.in | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/init/completions/functions.fish b/init/completions/functions.fish index ce5344282..3095c4bfc 100644 --- a/init/completions/functions.fish +++ b/init/completions/functions.fish @@ -1,5 +1,5 @@ complete -c functions -s e -l erase -d (_ "Erase function") -x -a "(functions -n)" -complete -c functions -xa "(functions -n)" -d (_ "Function") +complete -c functions -xa "(functions -na)" -d (_ "Function") complete -c functions -s a -l all -d (_ "Show hidden functions") complete -c functions -s h -l help -d (_ "Display help and exit") complete -c functions -s d -l description -d (_ "Set function description") -x diff --git a/init/completions/mount.fish b/init/completions/mount.fish index f94c0e7b0..af7e3cb9e 100644 --- a/init/completions/mount.fish +++ b/init/completions/mount.fish @@ -63,6 +63,6 @@ complete -c mount -x -s t -d (_ 'Filesystem') -a $__fish_filesystems complete -c mount -x -s o -d (_ 'Mount option') -a '(__fish_append , $__fish_mount_opts)' -set -g __fish_mount_opts async\tUse\ asynchronous\ I/O atime\tUpdate\ time\ on\ each\ access auto\tMounted\ with\ -a defaults\tUse\ default\ options dev\tInterpret\ character/block\ special\ devices exec\tPermit\ executables _netdev\tFilesystem\ uses\network noatime\tDo\ not\ update\ time\ on\ each\ access noauto\tNot\ mounted\ by\ -a nodev\tDo\ not\ interpret\ character/block\ special\ devices noexec\tDo\ not\ permit\ executables nosuid\tIgnore\ suid\ bits nouser\tOnly\ root\ may\ mount remount\tRemount\ read-only\ filesystem ro\tMount\ read-only rw\tMount\ read-write suid\tAllow\ suid\ bits sync\tUse\ synchronous\ I/O dirsync\tUse\ synchronous\ directory\ operations user\tAny\ user\ may\ mount users\tAny\ user\ may\ mount\ and\ unmount +set -g __fish_mount_opts async\tUse\ asynchronous\ I/O atime\tUpdate\ time\ on\ each\ access auto\tMounted\ with\ -a defaults\tUse\ default\ options dev\tInterpret\ character/block\ special\ devices exec\tPermit\ executables _netdev\tFilesystem\ uses\ network noatime\tDo\ not\ update\ time\ on\ each\ access noauto\tNot\ mounted\ by\ -a nodev\tDo\ not\ interpret\ character/block\ special\ devices noexec\tDo\ not\ permit\ executables nosuid\tIgnore\ suid\ bits nouser\tOnly\ root\ may\ mount remount\tRemount\ read-only\ filesystem ro\tMount\ read-only rw\tMount\ read-write suid\tAllow\ suid\ bits sync\tUse\ synchronous\ I/O dirsync\tUse\ synchronous\ directory\ operations user\tAny\ user\ may\ mount users\tAny\ user\ may\ mount\ and\ unmount diff --git a/init/fish_complete.fish.in b/init/fish_complete.fish.in index c54794a05..96b73b786 100644 --- a/init/fish_complete.fish.in +++ b/init/fish_complete.fish.in @@ -233,8 +233,8 @@ end function __fish_append -d "Internal completion function for appending string to the commandline" set separator $argv[1] set -e argv[1] - set str (commandline -tc| sed -re 's/(.*'$separator')[^'$separator']*/\1/') - printf "%s\n" $str$argv $str$argv, + set str (commandline -tc| sed -ne "s/\(.*$separator\)[^$separator]*/\1/p") + printf "%s\n" "$str"$argv "$str"(printf "%s\n" $argv|sed -e "s/\(\t\|\$\)/,\1/") end #