Commit 5832226c authored by Fabio Pelosin's avatar Fabio Pelosin

[Pod:Command] Improved help layout

parent 4e2bfd3e
...@@ -19,12 +19,13 @@ module Pod ...@@ -19,12 +19,13 @@ module Pod
def message def message
[ [
@command_class.banner,
'', '',
'Options', @command_class.banner.gsub(/\$ pod (.*)/, '$ pod \1'.green),
'-------',
'', '',
options 'Options:',
'',
options,
"\n",
].join("\n") ].join("\n")
end end
...@@ -46,15 +47,10 @@ module Pod ...@@ -46,15 +47,10 @@ module Pod
end end
def self.banner def self.banner
"To see help for the available commands run:\n" \ commands = ['install', 'list', 'push', 'repo', 'search', 'setup', 'spec'].sort
"\n" \ banner = "\nTo see help for the available commands run:\n\n"
" * $ pod install --help\n" \ commands.each {|cmd| banner << " * $ pod #{cmd.green} --help\n"}
" * $ pod list --help\n" \ banner
" * $ pod push --help\n" \
" * $ pod repo --help\n" \
" * $ pod search --help\n" \
" * $ pod setup --help\n" \
" * $ pod spec --help"
end end
def self.options def self.options
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment