summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2021-04-19 23:07:51 +0200
committerOliver Kiddle <opk@zsh.org>2021-04-19 23:07:51 +0200
commit79258d090c1e270e348e9b3bdb1ace7e4622d709 (patch)
tree2fdf527069a544b79a76f6f1d57317a30d5b078e
parentd01d0a12899ad73b1072e05e7abcce44ea4273bd (diff)
downloadzsh-79258d090c1e270e348e9b3bdb1ace7e4622d709.tar.gz
zsh-79258d090c1e270e348e9b3bdb1ace7e4622d709.zip
48619: complete inventory plugins in assignments to ANSIBLE_INVENTORY_ENABLED
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_ansible14
2 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f29a8379..8afdef958 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2021-04-19 Oliver Kiddle <opk@zsh.org>
+ * 48619: Completion/Unix/Command/_ansible: complete inventory
+ plugins in assignments to ANSIBLE_INVENTORY_ENABLED
+
* 48618: Completion/Unix/Command/_date,
Completion/Unix/Command/_grep, Completion/Unix/Command/_netstat,
Completion/Unix/Command/_ping, Completion/Unix/Command/_readelf,
diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible
index 9de9b6675..c81308586 100644
--- a/Completion/Unix/Command/_ansible
+++ b/Completion/Unix/Command/_ansible
@@ -1,4 +1,4 @@
-#compdef ansible ansible-config ansible-console ansible-doc ansible-galaxy ansible-inventory ansible-playbook ansible-pull ansible-vault -value-,ANSIBLE_STDOUT_CALLBACK,-default-
+#compdef ansible ansible-config ansible-console ansible-doc ansible-galaxy ansible-inventory ansible-playbook ansible-pull ansible-vault -value-,ANSIBLE_STDOUT_CALLBACK,-default- -value-,ANSIBLE_INVENTORY_ENABLED,-default-
local curcontext="$curcontext" plug plugvar subcmd ign ret=1
local -a args state line expl gactions
@@ -9,6 +9,10 @@ case $service in
plug=callback
state=plugins
;;
+ *,ANSIBLE_INVENTORY_ENABLED,*)
+ plug=inventory
+ state=plugins
+ ;;
ansible|ansible-console|ansible-doc|ansible-playbook)
args=(
\*{-M+,--module-path=}'[specify path to modules]:module path:_dir_list'
@@ -125,6 +129,7 @@ case $service in
'(-y --yaml --vars --graph)--toml[use TOML format instead of JSON]'
'(-y --yaml)--vars[add variables to the graph display]'
'(-y --yaml --toml --vars --graph)'{-y,--yaml}'[use YAML format instead of JSON]'
+ ':host or group:->hosts'
)
;;
ansible-galaxy)
@@ -238,7 +243,7 @@ case $state in
;;
galaxy)
ign=''
- gactions=( delete import info init install list login remove search setup )
+ gactions=( delete import info init install list remove search setup )
case ${(j.:.)line[1,3]} in
(role|collection):*:*)
subcmd="${line[1]}-${line[2]}"
@@ -326,11 +331,6 @@ case $state in
'--role-name=[specify name the role should have]:role'
)
;;
- role-login)
- args+=(
- '--github-token=[identify with github token rather than username and password]'
- )
- ;;
collection-build)
args+=(
'--output-path=[specify path in which the collection is built to]:path [.]:_directories'