diff options
author | elijah <elijah@riseup.net> | 2012-11-29 08:06:34 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2012-11-29 08:06:34 -0800 |
commit | 0732609a4a8d4906584f6ac4b3cdff2ad6793c66 (patch) | |
tree | db99b74b38894a2ffabea4d875ba76426e226e6b | |
parent | e5ed1ba2df6f735e32de35d9171d572dce322b7f (diff) | |
download | leap_cli-0732609a4a8d4906584f6ac4b3cdff2ad6793c66.tar.gz leap_cli-0732609a4a8d4906584f6ac4b3cdff2ad6793c66.tar.bz2 |
include entire subcommand in help list
-rw-r--r-- | lib/lib_ext/gli.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/lib_ext/gli.rb b/lib/lib_ext/gli.rb index 0bfdbc1..32ae0bc 100644 --- a/lib/lib_ext/gli.rb +++ b/lib/lib_ext/gli.rb @@ -33,11 +33,7 @@ module GLI command_info_list << [name, command.description] if command.commands.any? @sorter.call(command.commands_declaration_order).each do |cmd| - if command.get_default_command == cmd.name - command_info_list << [SUB_CMD_INDENT + cmd.names,cmd.description + " (default)"] - else - command_info_list << [SUB_CMD_INDENT + cmd.names,cmd.description] - end + command_info_list << [SUB_CMD_INDENT + command.name.to_s + " " + cmd.names,cmd.description + (command.get_default_command == cmd.name ? " (default)" : "")] end end end |