use simple quotes for constant strings

This commit is contained in:
Guillaume Rousse 2011-02-23 21:42:08 +01:00
parent 2e88c29991
commit a29ed87cd5

View File

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