[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-23-ga29ed87

Guillaume Rousse Guillaume.Rousse at inria.fr
Wed Feb 23 20:42:27 UTC 2011


The following commit has been merged in the master branch:
commit a29ed87cd5726e431d17050729a788b17ae98f2c
Author: Guillaume Rousse <Guillaume.Rousse at inria.fr>
Date:   Wed Feb 23 21:42:08 2011 +0100

    use simple quotes for constant strings

diff --git a/completions/puppet b/completions/puppet
index c318a34..0f45f65 100644
--- a/completions/puppet
+++ b/completions/puppet
@@ -3,16 +3,16 @@
 _puppet_logdest()
 {
     if [ -z "$cur" ]; then
-        COMPREPLY=( $( compgen -W "syslog console /" -- "$cur" ) )
+        COMPREPLY=( $( compgen -W 'syslog console /' -- "$cur" ) )
     else
-        COMPREPLY=( $( compgen -W "syslog console" -- "$cur" ) )
+        COMPREPLY=( $( compgen -W 'syslog console' -- "$cur" ) )
         _filedir
     fi
 }
 
 _puppet_digest()
 {
-    COMPREPLY=( $( compgen -W "MD5 MD2 SHA1 SHA256" -- "$cur" ) )
+    COMPREPLY=( $( compgen -W 'MD5 MD2 SHA1 SHA256' -- "$cur" ) )
 }
 
 _puppet_certs()
@@ -21,7 +21,7 @@ _puppet_certs()
     PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type puppetca  &>/dev/null \
         && puppetca=puppetca
     
-    if [[ "$1" = "--all" ]]; then
+    if [[ "$1" = '--all' ]]; then
         cert_list=$( $puppetca --list --all | sed -e 's/^[+-]\?\s*\(\S\+\)\s\+.*$/\1/' )
     else
         cert_list=$( $puppetca --list )
@@ -97,8 +97,8 @@ _puppet()
                    command=apply
                    ;;
                *)
-                  COMPREPLY=( $( compgen -W "agent apply cert describe doc \
-                      filebucket kick master queue resource" -- "$cur" ) )
+                  COMPREPLY=( $( compgen -W 'agent apply cert describe doc \
+                      filebucket kick master queue resource' -- "$cur" ) )
                   return 0
                   ;;
             esac
@@ -116,8 +116,8 @@ _puppet()
                     ;;
                 --serve)
                     # From /usr/lib/ruby/1.8/puppet/network/handler/
-                    COMPREPLY=( $( compgen -W "ca filebucket fileserver master \
-                        report runner status" -- "$cur" ) )
+                    COMPREPLY=( $( compgen -W 'ca filebucket fileserver master \
+                        report runner status' -- "$cur" ) )
                     return 0
                     ;;
                 --digest)
@@ -125,15 +125,15 @@ _puppet()
                     return 0
                     ;;
                 --waitforcert)
-                    COMPREPLY=( $( compgen -W "0 15 30 60 120" -- "$cur" ) )
+                    COMPREPLY=( $( compgen -W '0 15 30 60 120' -- "$cur" ) )
                     return 0
                     ;;
                 *)
-                    COMPREPLY=( $( compgen -W "--daemonize --no-daemonize \
+                    COMPREPLY=( $( compgen -W '--daemonize --no-daemonize \
                         --debug --detailed-exitcodes --disable --enable \
                         --help --fqdn --logdest --onetime --serve --test \
                         --noop --digest --fingerprint --version --verbose \
-                        --waitforcert --no-client" -- "$cur" ) )
+                        --waitforcert --no-client' -- "$cur" ) )
                     return 0
             esac
             ;;
@@ -145,9 +145,9 @@ _puppet()
                     ;;
                 *)
                     if [[ "$cur" == -* ]]; then
-                        COMPREPLY=( $( compgen -W "--help --version --debug \
+                        COMPREPLY=( $( compgen -W '--help --version --debug \
                             --verbose --execute --detailed-exitcodes \
-                            --logdest" -- "$cur" ) )
+                            --logdest' -- "$cur" ) )
                     else
                         _filedir
                     fi
@@ -162,7 +162,7 @@ _puppet()
                     ;;
                 *)
                     subcommand=$prev
-                    COMPREPLY=( $( compgen -W "--digest --debug --verbose" \
+                    COMPREPLY=( $( compgen -W '--digest --debug --verbose' \
                         -- "$cur" ) )
                     case $subcommand in
                         --generate)
@@ -171,33 +171,33 @@ _puppet()
                             ;;
                         --clean|--fingerprint|--revoke|--verify)
                             COMPREPLY=( "${COMPREPLY[@]}" $( compgen \
-                                -W "--all" -- "$cur" ) )
+                                -W '--all' -- "$cur" ) )
                             _puppet_certs --all
                             return 0
                             ;;
                         --sign)
                             COMPREPLY=( "${COMPREPLY[@]}" $( compgen \
-                                -W "--all" -- "$cur" ) )
+                                -W '--all' -- "$cur" ) )
                             _puppet_certs
                             return 0
                             ;;
                         --list|--print)
                             COMPREPLY=( "${COMPREPLY[@]}" $( compgen \
-                                -W "--all" -- "$cur" ) )
+                                -W '--all' -- "$cur" ) )
                             return 0
                             ;;
                         *)
-                            COMPREPLY=( $( compgen -W "--clean --generate \
+                            COMPREPLY=( $( compgen -W '--clean --generate \
                                 --help --list --print --fingerprint --revoke \
-                                --sign --version --verify" -- "$cur" ) )
+                                --sign --version --verify' -- "$cur" ) )
                             return 0
                     esac
             esac
             ;; 
         describe)
             if [[ "$cur" == -* ]]; then
-                COMPREPLY=( $( compgen -W "--help --short --providers --list \
-                    --meta" -- "$cur" ) )
+                COMPREPLY=( $( compgen -W '--help --short --providers --list \
+                    --meta' -- "$cur" ) )
             else
                 _puppet_types
             fi
@@ -210,7 +210,7 @@ _puppet()
                     return 0
                     ;;
                 --mode)
-                    COMPREPLY=( $( compgen -W "text trac pdf rdoc" -- "$cur" ) )
+                    COMPREPLY=( $( compgen -W 'text trac pdf rdoc' -- "$cur" ) )
                     return 0
                     ;;
                 --reference)
@@ -219,8 +219,8 @@ _puppet()
                     ;;
                 *)
                     if [[ "$cur" == -* ]]; then
-                        COMPREPLY=( $( compgen -W "--all --help --outputdir \
-                            --mode --reference --charset --list" -- "$cur" ) )
+                        COMPREPLY=( $( compgen -W '--all --help --outputdir \
+                            --mode --reference --charset --list' -- "$cur" ) )
                     else
                         _filedir
                     fi
@@ -239,11 +239,11 @@ _puppet()
                     ;;
                 *)
                     if [[ "$cur" == -* ]]; then
-                        COMPREPLY=( $( compgen -W "--help --version --debug \
-                            --verbose --local --remote --server --bucket" \
+                        COMPREPLY=( $( compgen -W '--help --version --debug \
+                            --verbose --local --remote --server --bucket' \
                             -- "$cur" ) )
                     else
-                        COMPREPLY=( $( compgen -W "backup get restore" \
+                        COMPREPLY=( $( compgen -W 'backup get restore' \
                             -- "$cur" ) )
                         _filedir
                     fi
@@ -264,9 +264,9 @@ _puppet()
                     ;;
                 *)
                     if [[ "$cur" == -* ]]; then
-                        COMPREPLY=( $( compgen -W "--all --class --debug \
+                        COMPREPLY=( $( compgen -W '--all --class --debug \
                             --foreground --help --host --no-fqdn \
-                            --ignoreschedules --tag --test --ping" -- "$cur" ) )
+                            --ignoreschedules --tag --test --ping' -- "$cur" ) )
                     else
                         _known_hosts_real "$cur"
                     fi
@@ -280,8 +280,8 @@ _puppet()
                     return 0
                     ;;
                 *)
-                    COMPREPLY=( $( compgen -W "--daemonize --no-daemonize \
-                        --debug --help --logdest --verbose --version" \
+                    COMPREPLY=( $( compgen -W '--daemonize --no-daemonize \
+                        --debug --help --logdest --verbose --version' \
                         -- "$cur" ) )
                     return 0
             esac
@@ -294,9 +294,9 @@ _puppet()
                     ;;
                 *)
                     if [[ "$cur" == -* ]]; then
-                        COMPREPLY=( $( compgen -W "--help --version --debug \
+                        COMPREPLY=( $( compgen -W '--help --version --debug \
                             --verbose --execute --detailed-exitcodes \
-                            --logdest" -- "$cur" ) )
+                            --logdest' -- "$cur" ) )
                     else
                         _filedir
                     fi
@@ -304,7 +304,7 @@ _puppet()
             esac
             ;; 
         resource|*)
-            COMPREPLY=( $( compgen -W "--help --version --debug --verbose" \
+            COMPREPLY=( $( compgen -W '--help --version --debug --verbose' \
                 -- "$cur" ) )
             return 0
             ;; 

-- 
bash-completion



More information about the Bash-completion-commits mailing list