mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Fix monochrome and color-output options
This commit is contained in:
parent
977d3beb2d
commit
6edd66662d
@ -89,10 +89,10 @@ module YouPlot
|
||||
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 }
|
||||
UnicodePlot::IOContext.define_method(:color?) { true } # FIXME
|
||||
end
|
||||
parser.on('-M', '--monochrome', TrueClass, 'no colouring even if writing to a tty') do |_v|
|
||||
UnicodePlot::StyledPrinter.define_method(:color?) { |_o| false }
|
||||
UnicodePlot::IOContext.define_method(:color?) { false } # FIXME
|
||||
end
|
||||
parser.on('--encoding STR', String, 'Specify the input encoding') do |v|
|
||||
options[:encoding] = v
|
||||
|
Loading…
Reference in New Issue
Block a user