Project

General

Profile

« Previous | Next » 

Revision 97d3e6a1

Added by Marc Dequènes almost 15 years ago

  • ID 97d3e6a1654ac4c249b50bfe81246e8f62a84801

[evol] added short version for global program options

View differences:

bin/shadowwalker
cmdparser.options = CmdParse::OptionParserWrapper.new do |opt|
opt.separator "Global options:"
opt.on("--debug", "Output debug info without being formated") {|t| $program_options[:debug] = true }
opt.on("--expert", "Output extra info for expert users") {|t| $program_options[:expert] = true }
opt.on("--handles", "Output with handles (objects/field/... keys used for manipulations)") {|t| $program_options[:handles] = true }
opt.on("-d", "--debug", "Output debug info without being formated") {|t| $program_options[:debug] = true }
opt.on("-e", "--expert", "Output extra info for expert users") {|t| $program_options[:expert] = true }
opt.on("-H", "--handles", "Output with handles (objects/field/... keys used for manipulations)") {|t| $program_options[:handles] = true }
end
cmdparser.add_command(CmdParse::HelpCommand.new)

Also available in: Unified diff