The help command used for the two-level interactive help system
# File lib/gli/commands/help.rb, line 84 def skips_around ; @@skips_around ; end
# File lib/gli/commands/help.rb, line 83 def skips_post ; @@skips_post ; end
# File lib/gli/commands/help.rb, line 82 def skips_pre ; @@skips_pre ; end
# File lib/gli/commands/help.rb, line 58 def initialize(app,output=$stdout,error=$stderr) super(:names => :help, :description => 'Shows a list of commands or help for one command', :arguments_name => 'command', :long_desc => 'Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function', :arguments => [Argument.new(:command_name, [:multiple, :optional])]) @app = app @parent = app @sorter = SORTERS[@app.help_sort_type] @text_wrapping_class = WRAPPERS[@app.help_text_wrap_type] @synopsis_formatter_class = SYNOPSIS_FORMATTERS[@app.synopsis_format_type] desc 'List commands one per line, to assist with shell completion' switch :c action do |global_options,options,arguments| if global_options[:version] && !global_options[:help] puts "#{@app.exe_name} version #{@app.version_string}" else show_help(global_options,options,arguments,output,error) end end end
Configure help to explicitly skip or not skip the around block when the help command runs. This is here because the creation of the help command is outside of the client programmer’s control
# File lib/gli/commands/help.rb, line 56 def self.skips_around=(skips_around) ; @@skips_around = skips_around ; end
Configure help to explicitly skip or not skip the post block when the help command runs. This is here because the creation of the help command is outside of the client programmer’s control
# File lib/gli/commands/help.rb, line 52 def self.skips_post=(skips_post) ; @@skips_post = skips_post ; end
Configure help to explicitly skip or not skip the pre block when the help command runs. This is here because the creation of the help command is outside of the client programmer’s control
# File lib/gli/commands/help.rb, line 48 def self.skips_pre=(skips_pre) ; @@skips_pre = skips_pre ; end