From 3c0ce709ac6321a90f6daababb9b053b3e0cb756 Mon Sep 17 00:00:00 2001 From: elijah Date: Sat, 8 Mar 2014 12:52:36 -0800 Subject: added --no-color flag --- lib/leap_cli/commands/pre.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/leap_cli/commands/pre.rb') diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb index 318282d..4b62b5b 100644 --- a/lib/leap_cli/commands/pre.rb +++ b/lib/leap_cli/commands/pre.rb @@ -23,6 +23,10 @@ module LeapCli; module Commands desc 'Enable debugging library (leap_cli development only)' switch :debug, :negatable => false + desc 'Disable colors in output' + default_value true + switch 'color', :negatable => true + pre do |global,command,options,args| # # set verbosity @@ -62,6 +66,7 @@ module LeapCli; module Commands LeapCli.log_file = global[:log] || LeapCli.leapfile.log LeapCli::Util.log_raw(:log) { $0 + ' ' + ORIGINAL_ARGV.join(' ')} log_version + LeapCli.log_in_color = global[:color] # # load all the nodes everything -- cgit v1.2.3