mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-06 07:10:10 +08:00
Improved help message of sub parsers
This commit is contained in:
parent
7020785818
commit
522a111aa9
@ -81,7 +81,15 @@ module Uplot
|
||||
end
|
||||
|
||||
def create_sub_parsers
|
||||
parsers = Hash.new { |h, k| h[k] = create_default_parser }
|
||||
parsers = Hash.new do |h, k|
|
||||
h[k] = create_default_parser do |parser|
|
||||
parser.banner = <<~MSG
|
||||
Usage: uplot #{k} [options]
|
||||
|
||||
Options:
|
||||
MSG
|
||||
end
|
||||
end
|
||||
|
||||
parsers[:barplot] = \
|
||||
parsers[:bar]
|
||||
@ -187,7 +195,8 @@ module Uplot
|
||||
|
||||
Usage: uplot <command> [options]
|
||||
|
||||
Command: #{sub_parsers.keys.join(' ')}
|
||||
Command:
|
||||
#{sub_parsers.keys.join("\n ")}
|
||||
|
||||
Options:
|
||||
MSG
|
||||
|
Loading…
Reference in New Issue
Block a user