zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: update ansible completion to 2.10.8
Date: Tue, 04 May 2021 20:52:43 +0200	[thread overview]
Message-ID: <54926-1620154363.547876@AFIl.0ZTd.hM34> (raw)

Mostly some changes to the password options and ansible-vault.

This post is really to test if the restarted Exim with security patches
applied is working fine. Sympa was also upgraded in the process.

Oliver

diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible
index c81308586..65cae148e 100644
--- a/Completion/Unix/Command/_ansible
+++ b/Completion/Unix/Command/_ansible
@@ -46,9 +46,9 @@ case $service in
   ;|
   ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull)
     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-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)
@@ -229,11 +229,11 @@ case $state in
     if zstyle -T ":completion:${curcontext}:plugins" verbose; then
       (( ${(P)#plugvar} )) || set -A ${plugvar} \
 	  ${${(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
       (( ${(P)#plugvar} )) || set -A ${plugvar} \
 	  ${${(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
   ;;
   tags)
@@ -270,12 +270,19 @@ case $state in
         args+=(
           '(-c --ignore-certs)'{-c,--ignore-certs}'[ignore SSL certificate validation errors]'
           '(-s --server)'{-s+,--server=}'[specify API server destination]:server:_hosts'
+          --{token,api-key}='[specify ansible galaxy API key]:api key'
           \*{-v,--verbose}'[verbose mode]'
         )
       ;|
-      collection-*)
-        args+=( '--api-key=[specify ansible galaxy API key]:api key' )
+      role-setup) # order important here, source comes before github args
+        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))
 	args+=( '(-p --roles-path)'{-p,--roles-path}'[specify location of roles]:path:_directories' )
       ;|
@@ -334,23 +341,28 @@ case $state in
       collection-build)
         args+=(
           '--output-path=[specify path in which the collection is built to]:path [.]:_directories'
+          '*:collection directory to build:_directories'
         )
       ;;
       collection-init)
 	args+=(
           '--collection-skeleton=[specify path to a collection skeleton that the new role should be based upon]:path:_files'
+          ': :_guard "^-*" "collection name"'
 	)
       ;;
       collection-publish)
         args+=(
           "--no-wait[don't wait for import validation results]"
           '--import-timeout=[specify time to wait for import process]:time'
+          ':collection tarball:_files'
         )
       ;;
       collection-install)
         args+=(
           '(-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
@@ -362,13 +374,13 @@ case $state in
     (( $#words > 2 )) && ign='!'
     args=(
       "${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-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]'
     )
     case $line[1] in
-      create|encrypt*|edit|rekey)
+      create|(de|en)crypt*|edit|rekey)
 	args+=(
 	  '--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' ) ;|
-      (en|de)crypt) args+=( '::file:_files' ) ;;
-      rekey)
+      decrypt|rekey)
         args+=(
           '--new-vault-id=[specify new vault identity to use]:vault identity'
           '--new-vault-password-file=[specify new vault password file]:vault password file:_files'
         )
-      ;;
+      ;|
+      (en|de)crypt) args+=( '::file:_files' ) ;;
     esac
     _arguments -s -S $args && ret=0
   ;;


                 reply	other threads:[~2021-05-04 18:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54926-1620154363.547876@AFIl.0ZTd.hM34 \
    --to=opk@zsh.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).