zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Improve autocompletion of ansible-vault
@ 2019-08-01 11:14 Lajos Koszti
  2019-08-01 11:18 ` Lajos Koszti
  0 siblings, 1 reply; 2+ messages in thread
From: Lajos Koszti @ 2019-08-01 11:14 UTC (permalink / raw)
  To: zsh-workers

Autocomplete ansible-vault actions like create, edit, etc.
Also autocomplete file names for various ansible-vault actions

-- 
Lajos Koszti

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Improve autocompletion of ansible-vault
  2019-08-01 11:14 [PATCH] Improve autocompletion of ansible-vault Lajos Koszti
@ 2019-08-01 11:18 ` Lajos Koszti
  0 siblings, 0 replies; 2+ messages in thread
From: Lajos Koszti @ 2019-08-01 11:18 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 53 bytes --]

The patch wasn't attached missing

-- 
Koszti Lajos


[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 903 bytes --]

diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible
index a6e586da3..0ba5ba2b9 100644
--- a/Completion/Unix/Command/_ansible
+++ b/Completion/Unix/Command/_ansible
@@ -166,6 +166,7 @@ case $service in
   ;;
   ansible-vault)
     args=( -A "-*" $args
+      '::action:(create decrypt edit encrypt encrypt_string rekey view)'
       '--new-vault-id=[specify new vault identity to use for rekey]:vault id'
       '--new-vault-password-file=[specify new vault password file to use for rekey]:file:_files'
       '*::args:->vault'
@@ -310,6 +311,9 @@ case $state in
 	  '(-n --name)'{-n+,--name=}'[specify the variable name]:variable'
 	  '--stdin-name=[specify the variable name for stdin]:variable'
 	)
+      ;|
+      create|edit|rekey|view) args+=( ':file:_files' ) ;|
+      (en|de)crypt) args+=( '::file:_files' )
       ;;
     esac
     _arguments -s -S $args && ret=0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-01 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01 11:14 [PATCH] Improve autocompletion of ansible-vault Lajos Koszti
2019-08-01 11:18 ` Lajos Koszti

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).