Add count or c sub command.

This commit is contained in:
kojix2 2020-07-31 12:17:40 +09:00
parent d72c084602
commit 1fb369e26b

View File

@ -39,6 +39,7 @@ module Uplot
parsers['bar'] .on('-c', '--count', TrueClass) { |v| @count = v }
parsers['barplot'] = parsers['bar']
parsers['boxplot'] = parsers['box']
parsers['count'] = parsers['c'] # barplot -c
parsers.default = nil
main_parser.banner = <<~MSG
@ -74,6 +75,9 @@ module Uplot
barplot(data, headers)
when 'box', 'boxplot'
boxplot(data, headers)
when 'count', 'c'
@count = true
barplot(data, headers)
end.render($stderr)
print input if @output