From ac98c31f30b74b32ec0eea8df6c71b866b16b58e Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Fri, 30 May 2014 14:43:27 +0200 Subject: [PATCH] Puppet: use puppet terminology Usage: puppet [options] [options] --- completions/puppet | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/completions/puppet b/completions/puppet index be686e3c..58406a7c 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