mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
extract argcomplete completion mechanism into its own function
This commit is contained in:
parent
577a273228
commit
413fd2fc03
3 changed files with 12 additions and 24 deletions
|
@ -1,12 +1 @@
|
||||||
function __fish_az_complete
|
complete -c az -f -a '(__fish_argcomplete_complete az)'
|
||||||
set -lx _ARGCOMPLETE 1
|
|
||||||
set -lx _ARGCOMPLETE_IFS \n
|
|
||||||
set -lx _ARGCOMPLETE_SUPPRESS_SPACE 1
|
|
||||||
set -lx _ARGCOMPLETE_SHELL fish
|
|
||||||
set -lx COMP_LINE (commandline -pc)
|
|
||||||
set -lx COMP_POINT (string length (commandline -cp))
|
|
||||||
set -lx COMP_TYPE
|
|
||||||
az 8>&1 9>&2 2>/dev/null
|
|
||||||
end
|
|
||||||
|
|
||||||
complete -c az -f -a '(__fish_az_complete)'
|
|
||||||
|
|
|
@ -1,12 +1 @@
|
||||||
function __fish_qmk_complete
|
complete -c qmk -f -a '(__fish_argcomplete_complete qmk)'
|
||||||
set -lx _ARGCOMPLETE 1
|
|
||||||
set -lx _ARGCOMPLETE_IFS \n
|
|
||||||
set -lx _ARGCOMPLETE_SUPPRESS_SPACE 1
|
|
||||||
set -lx _ARGCOMPLETE_SHELL fish
|
|
||||||
set -lx COMP_LINE (commandline -pc)
|
|
||||||
set -lx COMP_POINT (string length (commandline -cp))
|
|
||||||
set -lx COMP_TYPE
|
|
||||||
qmk 8>&1 9>&2 2>/dev/null
|
|
||||||
end
|
|
||||||
|
|
||||||
complete -c qmk -f -a '(__fish_qmk_complete)'
|
|
||||||
|
|
10
share/functions/__fish_argcomplete_complete.fish
Normal file
10
share/functions/__fish_argcomplete_complete.fish
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
function __fish_argcomplete_complete
|
||||||
|
set -lx _ARGCOMPLETE 1
|
||||||
|
set -lx _ARGCOMPLETE_IFS \n
|
||||||
|
set -lx _ARGCOMPLETE_SUPPRESS_SPACE 1
|
||||||
|
set -lx _ARGCOMPLETE_SHELL fish
|
||||||
|
set -lx COMP_LINE (commandline -pc)
|
||||||
|
set -lx COMP_POINT (string length (commandline -cp))
|
||||||
|
set -lx COMP_TYPE
|
||||||
|
$argv 8>&1 9>&2 2>/dev/null
|
||||||
|
end
|
Loading…
Reference in a new issue