1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-06 07:36:20 +02:00

52769: fix completion of ansible keywords and --step option

This commit is contained in:
Oliver Kiddle 2024-03-18 21:12:55 +01:00
parent 57248b8883
commit 1e995cbb38
2 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,8 @@
2024-03-18 Oliver Kiddle <opk@zsh.org>
* 52769: Completion/Unix/Command/_ansible: fix completion of
ansible keywords and --step option
* 52750: Config/defs.mk.in, Etc/zsh-development-guide,
Src/Makemod.in.in, Src/Modules/files.c, Src/Modules/watch.c,
Src/Modules/zftp.c, Src/Modules/zprof.c, Src/Zle/compcore.c,

View File

@ -69,6 +69,11 @@ case $service in
"--skip-tags[only run plays and tasks whose tags don't match]"
)
;|
ansible-playbook|ansible-console)
args+=(
'--step[one-step-at-a-time: confirm each task before running]'
)
;|
ansible|ansible-console)
args+=(
'--task-timeout[set the task timeout limit]:timeout (seconds)'
@ -97,11 +102,6 @@ case $service in
'*::args:->config'
)
;;
ansible-console)
args+=(
'--step[one-step-at-a-time: confirm each task before running]'
)
;;
ansible-doc)
args+=(
'!--metadata-dump' '!--no-fail-on-errors' # "internal use only"
@ -440,11 +440,11 @@ if [[ $state = plugins ]]; then
typeset -ga ${plug}
if zstyle -T ":completion:${curcontext}:plugins" verbose; then
(( ${(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 -M 'r:|.=* r:|=*' && ret=0
else
(( ${(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 -M 'r:|.=* r:|=*' -a $plugvar && ret=0
fi
fi