1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-10 12:40:58 +02:00

48783: update ansible completion to 2.10.8

This commit is contained in:
Oliver Kiddle 2021-05-16 21:23:15 +02:00
parent 41071eaed7
commit 61e4e43ac9
2 changed files with 28 additions and 13 deletions

View file

@ -1,5 +1,8 @@
2021-05-16 Oliver Kiddle <opk@zsh.org> 2021-05-16 Oliver Kiddle <opk@zsh.org>
* 48783: Completion/Unix/Command/_ansible: update ansible
completion to 2.10.8
* 48623: Completion/Unix/Command/_ssh: update options in openssh * 48623: Completion/Unix/Command/_ssh: update options in openssh
completion to version 8.6 completion to version 8.6

View file

@ -46,9 +46,9 @@ case $service in
;| ;|
ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull) ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull)
args+=( args+=(
'--ask-vault-pass[ask for vault password]' --ask-vault-pass{,word}'[ask for vault password]'
'--vault-id=[specify vault identity to use]:vault identity' '--vault-id=[specify vault identity to use]:vault identity'
'--vault-password-file=[specify vault password file]:vault password file:_files' --vault-pass{,word}-file='[specify vault password file]:vault password file:_files'
) )
;| ;|
ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull) ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull)
@ -229,11 +229,11 @@ case $state in
if zstyle -T ":completion:${curcontext}:plugins" verbose; then if zstyle -T ":completion:${curcontext}:plugins" verbose; then
(( ${(P)#plugvar} )) || set -A ${plugvar} \ (( ${(P)#plugvar} )) || set -A ${plugvar} \
${${(f)"$(_call_program plugins ansible-doc -t $plug -l)"}/ ##/:} ${${(f)"$(_call_program plugins ansible-doc -t $plug -l)"}/ ##/:}
_describe -t plugins "${plug} plugin" $plugvar && ret=0 _describe -t plugins "${plug} plugin" $plugvar -M 'r:|.=* r:|=*' && ret=0
else else
(( ${(P)#plugvar} )) || set -A ${plugvar} \ (( ${(P)#plugvar} )) || set -A ${plugvar} \
${${(f)"$(_call_program plugins ansible-doc -t $plug -F)"}%% *} ${${(f)"$(_call_program plugins ansible-doc -t $plug -F)"}%% *}
_wanted plugins expl "${plug} plugin" compadd -a $plugvar && ret=0 _wanted plugins expl "${plug} plugin" compadd -M 'r:|.=* r:|=*' -a $plugvar && ret=0
fi fi
;; ;;
tags) tags)
@ -270,12 +270,19 @@ case $state in
args+=( args+=(
'(-c --ignore-certs)'{-c,--ignore-certs}'[ignore SSL certificate validation errors]' '(-c --ignore-certs)'{-c,--ignore-certs}'[ignore SSL certificate validation errors]'
'(-s --server)'{-s+,--server=}'[specify API server destination]:server:_hosts' '(-s --server)'{-s+,--server=}'[specify API server destination]:server:_hosts'
--{token,api-key}='[specify ansible galaxy API key]:api key'
\*{-v,--verbose}'[verbose mode]' \*{-v,--verbose}'[verbose mode]'
) )
;| ;|
collection-*) role-setup) # order important here, source comes before github args
args+=( '--api-key=[specify ansible galaxy API key]:api key' ) args+=( ': :_guard "^-*" "source"' '*:secret' )
;| ;|
role-(delete|import|setup))
args+=( ': :_guard "^-*" "github username"' ':github repository' )
;|
role-(info|init|install|list|remove))
args+=( '*: :_guard "^-*" "role name"' )
;;
role-(info|search|list|remove|install)) role-(info|search|list|remove|install))
args+=( '(-p --roles-path)'{-p,--roles-path}'[specify location of roles]:path:_directories' ) args+=( '(-p --roles-path)'{-p,--roles-path}'[specify location of roles]:path:_directories' )
;| ;|
@ -334,23 +341,28 @@ case $state in
collection-build) collection-build)
args+=( args+=(
'--output-path=[specify path in which the collection is built to]:path [.]:_directories' '--output-path=[specify path in which the collection is built to]:path [.]:_directories'
'*:collection directory to build:_directories'
) )
;; ;;
collection-init) collection-init)
args+=( args+=(
'--collection-skeleton=[specify path to a collection skeleton that the new role should be based upon]:path:_files' '--collection-skeleton=[specify path to a collection skeleton that the new role should be based upon]:path:_files'
': :_guard "^-*" "collection name"'
) )
;; ;;
collection-publish) collection-publish)
args+=( args+=(
"--no-wait[don't wait for import validation results]" "--no-wait[don't wait for import validation results]"
'--import-timeout=[specify time to wait for import process]:time' '--import-timeout=[specify time to wait for import process]:time'
':collection tarball:_files'
) )
;; ;;
collection-install) collection-install)
args+=( args+=(
'(-p --collections-path)'{-p+,--collections-path=}'[specify directory containing collections]:_directories' '(-p --collections-path)'{-p+,--collections-path=}'[specify directory containing collections]:_directories'
'(-r --requirements-file)'{-r+,--requirements-file=}'[specify file containing a list of collections to install]:file:_files' '(-r --requirements-file *)'{-r+,--requirements-file=}'[specify file containing a list of collections to install]:file:_files'
'--pre[include pre-release versions]'
'*:collecion name:_files'
) )
;; ;;
esac esac
@ -362,13 +374,13 @@ case $state in
(( $#words > 2 )) && ign='!' (( $#words > 2 )) && ign='!'
args=( args=(
"${ign}(-)"{-h,--help}'[display usage information]' "${ign}(-)"{-h,--help}'[display usage information]'
'--ask-vault-pass[ask for vault password]' --ask-vault-pass{,word}'[ask for vault password]'
'--vault-id=[specify vault identity to use]:vault identity' '--vault-id=[specify vault identity to use]:vault identity'
'--vault-password-file=[specify vault password file]:vault password file:_files' --vault-pass{,word}-file='[specify vault password file]:vault password file:_files'
\*{-v,--verbose}'[verbose mode]' \*{-v,--verbose}'[verbose mode]'
) )
case $line[1] in case $line[1] in
create|encrypt*|edit|rekey) create|(de|en)crypt*|edit|rekey)
args+=( args+=(
'--encrypt-vault-id=[specify vault id to use to encrypt (required if more than one vault-id is provided)]:vault id' '--encrypt-vault-id=[specify vault id to use to encrypt (required if more than one vault-id is provided)]:vault id'
) )
@ -382,13 +394,13 @@ case $state in
) )
;| ;|
create|edit|rekey|view) args+=( ':file:_files' ) ;| create|edit|rekey|view) args+=( ':file:_files' ) ;|
(en|de)crypt) args+=( '::file:_files' ) ;; decrypt|rekey)
rekey)
args+=( args+=(
'--new-vault-id=[specify new vault identity to use]:vault identity' '--new-vault-id=[specify new vault identity to use]:vault identity'
'--new-vault-password-file=[specify new vault password file]:vault password file:_files' '--new-vault-password-file=[specify new vault password file]:vault password file:_files'
) )
;; ;|
(en|de)crypt) args+=( '::file:_files' ) ;;
esac esac
_arguments -s -S $args && ret=0 _arguments -s -S $args && ret=0
;; ;;