fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
78c948282
master
1# Completion for vim-addons 2# ========================= 3# 4# Adrien Grellier <adrien.grellier@laposte.net> 5# 6 7function __fish_vim-addons_subcommand -d'Test if vim-addons has yet to be given the subcommand' 8for iin ( commandline -xpc) 9if contains --$i list status install remove disable amend files show 10return 1 11end 12end 13return 0 14end 15 16# Commands 17# -------- 18# list 19complete -c vim-addons -n __fish_vim-addons_subcommand -a list -f -d"list the names of the addons available in the system" 20# status 21complete -c vim-addons -n __fish_vim-addons_subcommand -a status -f -d"show the status of the addons available in the system" 22complete -c vim-addons -n"contains status (commandline -pxc)" -a"(vim-addons list)" -x 23# install 24complete -c vim-addons -n __fish_vim-addons_subcommand -a install -x -d"install one or more addons under ~/.vim" 25complete -c vim-addons -n"contains install (commandline -pxc)" -a"(vim-addons status | awk '\$2 != \"installed\" && \$1 != \"#\" { print \$1}')" -x 26# remove 27complete -c vim-addons -n __fish_vim-addons_subcommand -a remove -x -d"remove one or more addons from ~/.vim" 28complete -c vim-addons -n"contains remove (commandline -pxc)" -a"(vim-addons status | awk '\$2 != \"removed\" && \$1 != \"#\" { print \$1}')" -x 29# disable 30complete -c vim-addons -n __fish_vim-addons_subcommand -a disable -x -d"disable one or more addons to be used by the current user" 31complete -c vim-addons -n"contains disable (commandline -pxc)" -a"(vim-addons status | awk '\$2 != \"disable\" && \$1 != \"#\" { print \$1}')" -x 32# amend 33complete -c vim-addons -n __fish_vim-addons_subcommand -a amend -x -d"undo the effects of a previous disable command" 34complete -c vim-addons -n"contains amend (commandline -pxc)" -a"(vim-addons list)" -x 35# files 36complete -c vim-addons -n __fish_vim-addons_subcommand -a files -x -d"list, one per line, the files composing the specified addons" 37complete -c vim-addons -n"contains files (commandline -pxc)" -a"(vim-addons list)" -x 38# show 39complete -c vim-addons -n __fish_vim-addons_subcommand -a show -x -d"displays detailed information about the specified addons" 40complete -c vim-addons -n"contains show (commandline -pxc)" -a"(vim-addons list)" -x 41 42# Options 43# -------- 44complete -c vim-addons -s h -l help -d"show this usage message and exit" 45complete -c vim-addons -s q -l query -d"be quiet and make the output more parseable" 46complete -c vim-addons -s r -l registry-dir -d"set the registry directory" 47complete -c vim-addons -s s -l source-dir -d"set the addons source directory" 48complete -c vim-addons -s t -l target-dir -d"set the addons target directory" 49complete -c vim-addons -s v -l verbose -d"increase verbosity" 50complete -c vim-addons -s y -l system-dir -d"set the system-wide target directory" 51complete -c vim-addons -s w -l system-wide -d"set target directory to the system-wide one"