use simple quotes for constant strings
This commit is contained in:
parent
2e88c29991
commit
a29ed87cd5
@ -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
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user