lib/alf/shell/command/help.rb in alf-shell-0.14.0 vs lib/alf/shell/command/help.rb in alf-shell-0.15.0

- old
+ new

@@ -1,30 +1,12 @@ module Alf module Shell - class Help < Shell::Command() - - # Let NoSuchCommandError be passed to higher stage - no_react_to Quickl::NoSuchCommand - - options do |opt| - @dialect = :shell - opt.on('--lispy', - 'Display operator signatures in lispy DSL') do - @dialect = :lispy - end - opt.on('--shell', - 'Display operator signatures in shell DSL') do - @dialect = :shell - end - end + class Help < Shell::Command(__FILE__, __LINE__) # Command execution def execute(args) - sup = Quickl.super_command(self) - sub = (args.size != 1) ? sup : Quickl.sub_command!(sup, args.first) - doc = sub.documentation(:method => @dialect) - puts doc + show_help(args.first.strip) end - + end # class Help end # module Shell end # module Alf