aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-29 08:06:34 -0800
committerelijah <elijah@riseup.net>2012-11-29 08:06:34 -0800
commit0732609a4a8d4906584f6ac4b3cdff2ad6793c66 (patch)
treedb99b74b38894a2ffabea4d875ba76426e226e6b
parente5ed1ba2df6f735e32de35d9171d572dce322b7f (diff)
downloadleap_cli-0732609a4a8d4906584f6ac4b3cdff2ad6793c66.tar.gz
leap_cli-0732609a4a8d4906584f6ac4b3cdff2ad6793c66.tar.bz2
include entire subcommand in help list
-rw-r--r--lib/lib_ext/gli.rb6
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