show the help option on usage

This commit is contained in:
kojix2 2020-11-14 23:41:35 +09:00
parent f8ea11f0d0
commit a6ff1ebf2e

View File

@ -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|
@fmt = v
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|
@debug = v
end