Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Improve autocompletion of ansible-vault



The patch wasn't attached missing

-- 
Koszti Lajos

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


Messages sorted by: Reverse Date, Date, Thread, Author