mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-07 15:41:12 +08:00
show the help option on usage
This commit is contained in:
parent
f8ea11f0d0
commit
a6ff1ebf2e
@ -81,6 +81,12 @@ module Uplot
|
|||||||
opt.on('--fmt VAL', String, 'xyxy : header is like x1, y1, x2, y2, x3, y3...', 'xyy : header is like x, y1, y2, y2, y3...') do |v|
|
opt.on('--fmt VAL', String, 'xyxy : header is like x1, y1, x2, y2, x3, y3...', 'xyy : header is like x, y1, y2, y2, y3...') do |v|
|
||||||
@fmt = v
|
@fmt = v
|
||||||
end
|
end
|
||||||
|
# Optparse adds the help option, but it doesn't show up in usage.
|
||||||
|
# This is why you need the code below.
|
||||||
|
opt.on('--help', 'print sub-command help menu') do
|
||||||
|
puts opt.help
|
||||||
|
exit
|
||||||
|
end
|
||||||
opt.on('--debug', TrueClass, 'print preprocessed data') do |v|
|
opt.on('--debug', TrueClass, 'print preprocessed data') do |v|
|
||||||
@debug = v
|
@debug = v
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user