diff options
author | elijah <elijah@riseup.net> | 2014-11-30 13:31:27 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-11-30 13:31:27 -0800 |
commit | 6d0f242eacdaec645c48c3db3e78ee3da8fff03c (patch) | |
tree | 467b859d37fccc4b886788452ef48b983053fd4c | |
parent | c35b55cdf87d32382fc44a851166ec2cd15f5f4f (diff) |
add command aliases for most commonly used commands.
-rw-r--r-- | lib/leap_cli/commands/compile.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/deploy.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/env.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/inspect.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/list.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/node.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/test.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/commands/vagrant.rb | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/lib/leap_cli/commands/compile.rb b/lib/leap_cli/commands/compile.rb index b30aaea..9c0725f 100644 --- a/lib/leap_cli/commands/compile.rb +++ b/lib/leap_cli/commands/compile.rb @@ -3,7 +3,7 @@ module LeapCli module Commands desc "Compile generated files." - command :compile do |c| + command [:compile, :c] do |c| c.desc 'Compiles node configuration files into hiera files used for deployment.' c.arg_name 'ENVIRONMENT', :optional => true c.command :all do |all| diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb index 90807db..e413807 100644 --- a/lib/leap_cli/commands/deploy.rb +++ b/lib/leap_cli/commands/deploy.rb @@ -5,7 +5,7 @@ module LeapCli desc 'Apply recipes to a node or set of nodes.' long_desc 'The FILTER can be the name of a node, service, or tag.' arg_name 'FILTER' - command :deploy do |c| + command [:deploy, :d] do |c| # --fast c.switch :fast, :desc => 'Makes the deploy command faster by skipping some slow steps. A "fast" deploy can be used safely if you recently completed a normal deploy.', diff --git a/lib/leap_cli/commands/env.rb b/lib/leap_cli/commands/env.rb index 75f7100..80be217 100644 --- a/lib/leap_cli/commands/env.rb +++ b/lib/leap_cli/commands/env.rb @@ -6,7 +6,7 @@ module LeapCli "A node in one environment will never interact with a node from another environment. "+ "Environment pinning works by modifying your ~/.leaprc file and is dependent on the "+ "absolute file path of your provider directory (pins don't apply if you move the directory)" - command :env do |c| + command [:env, :e] do |c| c.desc "List the available environments. The pinned environment, if any, will be marked with '*'. Will also set the pin if run with an environment argument." c.arg_name 'ENVIRONMENT', :optional => true c.command :ls do |ls| diff --git a/lib/leap_cli/commands/inspect.rb b/lib/leap_cli/commands/inspect.rb index e8f5caf..20654fa 100644 --- a/lib/leap_cli/commands/inspect.rb +++ b/lib/leap_cli/commands/inspect.rb @@ -2,7 +2,7 @@ module LeapCli; module Commands desc 'Prints details about a file. Alternately, the argument FILE can be the name of a node, service or tag.' arg_name 'FILE' - command :inspect do |c| + command [:inspect, :i] do |c| c.switch 'base', :desc => 'Inspect the FILE from the provider_base (i.e. without local inheritance).', :negatable => false c.action do |global_options,options,args| object = args.first diff --git a/lib/leap_cli/commands/list.rb b/lib/leap_cli/commands/list.rb index b8d7739..0b78a2d 100644 --- a/lib/leap_cli/commands/list.rb +++ b/lib/leap_cli/commands/list.rb @@ -11,7 +11,7 @@ module LeapCli; module Commands "`leap list openvpn +local` matches all nodes with service \"openvpn\" AND tag \"local\"" arg_name 'FILTER', :optional => true - command :list do |c| + command [:list,:ls] do |c| c.flag 'print', :desc => 'What attributes to print (optional)' c.switch 'disabled', :desc => 'Include disabled nodes in the list.', :negatable => false c.action do |global_options,options,args| diff --git a/lib/leap_cli/commands/node.rb b/lib/leap_cli/commands/node.rb index 6709077..12d6b49 100644 --- a/lib/leap_cli/commands/node.rb +++ b/lib/leap_cli/commands/node.rb @@ -12,7 +12,7 @@ module LeapCli; module Commands ## desc 'Node management' - command :node do |node| + command [:node, :n] do |node| node.desc 'Create a new configuration file for a node named NAME.' node.long_desc ["If specified, the optional argument SEED can be used to seed values in the node configuration file.", "The format is property_name:value.", diff --git a/lib/leap_cli/commands/test.rb b/lib/leap_cli/commands/test.rb index fe48a1f..7e80be7 100644 --- a/lib/leap_cli/commands/test.rb +++ b/lib/leap_cli/commands/test.rb @@ -1,7 +1,7 @@ module LeapCli; module Commands desc 'Run tests.' - command :test do |test| + command [:test, :t] do |test| test.desc 'Run the test suit on FILTER nodes.' test.arg_name 'FILTER', :optional => true test.command :run do |run| diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb index 41fda03..31c7878 100644 --- a/lib/leap_cli/commands/vagrant.rb +++ b/lib/leap_cli/commands/vagrant.rb @@ -5,7 +5,7 @@ module LeapCli; module Commands desc "Manage local virtual machines." long_desc "This command provides a convient way to manage Vagrant-based virtual machines. If FILTER argument is missing, the command runs on all local virtual machines. The Vagrantfile is automatically generated in 'test/Vagrantfile'. If you want to run vagrant commands manually, cd to 'test'." - command :local do |local| + command [:local, :l] do |local| local.desc 'Starts up the virtual machine(s)' local.arg_name 'FILTER', :optional => true #, :multiple => false local.command :start do |start| |