[Bash-completion-commits] [bash-completion] 01/11: Puppet: use puppet terminology

Ville Skyttä scop-guest at moszumanska.debian.org
Mon Jun 2 09:42:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit ac98c31f30b74b32ec0eea8df6c71b866b16b58e
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Fri May 30 14:43:27 2014 +0200

    Puppet: use puppet terminology
    
    Usage: puppet <subcommand> [options] <action> [options]
---
 completions/puppet | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/completions/puppet b/completions/puppet
index be686e3..58406a7 100644
--- a/completions/puppet
+++ b/completions/puppet
@@ -50,7 +50,7 @@ _puppet()
     local cur prev words cword
     _init_completion || return
 
-    local xspec helpopts command subcommand
+    local xspec helpopts subcommand action
 
     case $prev in
         --help)
@@ -60,39 +60,39 @@ _puppet()
 
     case ${words[0]} in
         puppetmasterd)
-            command=master
+            subcommand=master
             ;;
         puppetd)
-            command=agent
+            subcommand=agent
             ;;
         puppetca)
-            command=cert
+            subcommand=cert
             ;;
         ralsh)
-            command=resource
+            subcommand=resource
             ;;
         puppetrun)
-            command=kick
+            subcommand=kick
             ;;
         puppetqd)
-            command=queue
+            subcommand=queue
             ;;
         filebucket)
-            command=filebucket
+            subcommand=filebucket
             ;;
         puppetdoc)
-            command=doc
+            subcommand=doc
             ;;
         pi)
-            command=describe
+            subcommand=describe
             ;;
         puppet)
             case ${words[1]} in
                agent|apply|cert|describe|doc|filebucket|kick|master|queue|resource)
-                   command=${words[1]}
+                   subcommand=${words[1]}
                    ;;
                *.pp|*.rb|-*)
-                   command=apply
+                   subcommand=apply
                    ;;
                *)
                   COMPREPLY=( $( compgen -W 'agent apply cert describe doc
@@ -102,7 +102,7 @@ _puppet()
             esac
     esac
 
-    case $command in
+    case $subcommand in
         agent)
             case $prev in
                 --fqdn)
@@ -159,10 +159,10 @@ _puppet()
                     return 0
                     ;;
                 *)
-                    subcommand=$prev
+                    action=$prev
                     COMPREPLY=( $( compgen -W '--digest --debug --verbose' \
                         -- "$cur" ) )
-                    case $subcommand in
+                    case $action in
                         --generate)
                             _known_hosts_real "$cur"
                             return 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list