Module: TicGitNG::Command::Help
- Defined in:
- lib/ticgit-ng/command/help.rb
Overview
Shows help for ticgit or a particular command
Usage: ti help (show help for ticgit) ti help command (show help for specified command)
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ticgit-ng/command/help.rb', line 12 def execute cli = CLI.new([]) if ARGV.length >= 2 # ti help {command} action = ARGV[1] if command = Command.get(action) cli.extend(command) else puts "Unknown command #{action}\n\n" end end puts cli.usage end |
#parser(opts) ⇒ Object
9 10 11 |
# File 'lib/ticgit-ng/command/help.rb', line 9 def parser(opts) opts. = "Usage: ti help [command]\n" end |