On Fri, Aug 21, 2020 at 02:44:54PM +0800, Wu Fengguang wrote:
@@ -199,7 +199,6 @@ def compare_matrixes(matrixes_list, matrixes_titles = matrixes_list.size, group_ warn 'Matrix cannot be empty!' return end
don't remove that line.
got it.
options = { 'perf-profile': 5, theme: :none }.merge(options) matrixes_values = get_matrixes_values(matrixes_list, options) remove_unchanged_field(matrixes_values)
@@ -17,6 +18,9 @@ require_relative '../lib/compare.rb' common_conditions = '' is_group = false dimensions = nil +theme = :classic +color = false +options = {}
opt_parser = OptionParser.new do |opts| opts.banner = 'Usage: compare "conditions" ... [option]' @@ -36,6 +40,14 @@ opt_parser = OptionParser.new do |opts| is_group = true end
- opts.on('-t', '--theme theme', 'theme to compare: classic/focus_good/focus_bad/striking/light') do |t|
- theme = t
- end
- opts.on('--color', 'turn on colorful display with current theme') do
- color = true
- end
这两个参数可以合并为一个吗?
--color none|classic|...
yes, user give a theme: none|classic|focus_good|... with --color and "none" is default theme, the effect is same with without --color
Thanks, Weitao
Thanks, Fengguang