mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
Fix the __fish_append shellscript function, as well as some completion bugs in gpg and mount
darcs-hash:20060113010245-ac50b-9780d63c65c73f2d61247cce484549ad3561fb74.gz
This commit is contained in:
parent
2b7781d3cb
commit
95d68e48f2
3 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
complete -c functions -s e -l erase -d (_ "Erase function") -x -a "(functions -n)"
|
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 a -l all -d (_ "Show hidden functions")
|
||||||
complete -c functions -s h -l help -d (_ "Display help and exit")
|
complete -c functions -s h -l help -d (_ "Display help and exit")
|
||||||
complete -c functions -s d -l description -d (_ "Set function description") -x
|
complete -c functions -s d -l description -d (_ "Set function description") -x
|
||||||
|
|
|
@ -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)'
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -233,8 +233,8 @@ end
|
||||||
function __fish_append -d "Internal completion function for appending string to the commandline"
|
function __fish_append -d "Internal completion function for appending string to the commandline"
|
||||||
set separator $argv[1]
|
set separator $argv[1]
|
||||||
set -e argv[1]
|
set -e argv[1]
|
||||||
set str (commandline -tc| sed -re 's/(.*'$separator')[^'$separator']*/\1/')
|
set str (commandline -tc| sed -ne "s/\(.*$separator\)[^$separator]*/\1/p")
|
||||||
printf "%s\n" $str$argv $str$argv,
|
printf "%s\n" "$str"$argv "$str"(printf "%s\n" $argv|sed -e "s/\(\t\|\$\)/,\1/")
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue