зеркало из https://github.com/microsoft/azure-cli.git
Merge pull request #114 from johanste/completer
Update shell statement completion script to make use of argcomplete
This commit is contained in:
Коммит
73ba22a5c6
|
@ -1,13 +1 @@
|
|||
if type compdef &>/dev/null; then
|
||||
#ZSH
|
||||
_az_complete() {
|
||||
compadd -- `"${COMP_WORDS[0]}" --complete "${words[@]:1}"`
|
||||
}
|
||||
compdef _az_complete az
|
||||
elif type complete &>/dev/null; then
|
||||
#BASH
|
||||
_az_complete() {
|
||||
COMPREPLY=( $(compgen -W '$("${COMP_WORDS[0]}" --complete "${COMP_WORDS[@]:1}")' -- "${COMP_WORDS[COMP_CWORD]}") )
|
||||
}
|
||||
complete -F _az_complete az
|
||||
fi
|
||||
eval "$(register-python-argcomplete az)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче