mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-06 07:10:10 +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
|
options[:progressive] = v
|
||||||
end
|
end
|
||||||
parser.on('-C', '--color-output', TrueClass, 'colorize even if writing to a pipe') do |_v|
|
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
|
end
|
||||||
parser.on('-M', '--monochrome', TrueClass, 'no colouring even if writing to a tty') do |_v|
|
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
|
end
|
||||||
parser.on('--encoding STR', String, 'Specify the input encoding') do |v|
|
parser.on('--encoding STR', String, 'Specify the input encoding') do |v|
|
||||||
options[:encoding] = v
|
options[:encoding] = v
|
||||||
|
Loading…
Reference in New Issue
Block a user