ctr: Enable shell autocompletion

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
This commit is contained in:
Manuel Rüger
2019-10-01 09:29:02 +02:00
parent 7f9530d95b
commit b5fa55b0c2
4 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
_cli_zsh_autocomplete() {
local -a opts
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
_describe 'values' opts
return
}
compdef _cli_zsh_autocomplete $PROG