mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Add color-output and monochrome options
This commit is contained in:
parent
95599fbf4f
commit
41acac8811
@ -90,6 +90,12 @@ module YouPlot
|
||||
parser.on('-p', '--progress', TrueClass, 'progressive mode [experimental]') do |v|
|
||||
options[:progressive] = v
|
||||
end
|
||||
parser.on('-C', '--color-output', TrueClass, 'colorize even if writing to a pipe') do |v|
|
||||
UnicodePlot::StyledPrinter.define_method(:color?){ |o| true }
|
||||
end
|
||||
parser.on('-M', '--monochrome', TrueClass, 'no colouring even if writing to a tty') do |v|
|
||||
UnicodePlot::StyledPrinter.define_method(:color?){ |o| false }
|
||||
end
|
||||
parser.on('--encoding STR', String, 'Specify the input encoding') do |v|
|
||||
options[:encoding] = v
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user