diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-12-28 12:25:17 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-12-28 12:25:17 -0500 |
commit | a4e463e111ba498197315b8c6e5d882eb73be4a8 (patch) | |
tree | 893b67400a7fd540d1b15984d75bda50e8ec34bc /lib/sisu/v4/screen_text_color.rb | |
parent | v4 v3: debug (internal code use), color markers for line number & file name (diff) |
v4: sisu: --color flag, which toggles color on/off (Closes: #622171)
* the fix here is specific to color on/off for reporting of sisu version
* sisu --version --color-off || sisu -v -k || sisu -kv
* there are various ways to control color output to screen
* --color-off or -k switches color off
* --color or --color-on switches color on, which is usually the default
* --color-toggle or -c toggles the default setting (in most cases)
* sisurc.yml can set default color state which affects most screen output
Diffstat (limited to 'lib/sisu/v4/screen_text_color.rb')
-rw-r--r-- | lib/sisu/v4/screen_text_color.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sisu/v4/screen_text_color.rb b/lib/sisu/v4/screen_text_color.rb index a9c0b367..1a4f87b9 100644 --- a/lib/sisu/v4/screen_text_color.rb +++ b/lib/sisu/v4/screen_text_color.rb @@ -68,12 +68,12 @@ module SiSU_Screen @cmd,@txt=cmd,txt @color_instruct=txt[0] flag=SiSU_Env::InfoProcessingFlag.new - if @cmd + if cmd #set default colors on or off -c acts as toggle against this default, if default is off -c turns on, if default is on -c turns off @use_color=(flag.color) \ - ? ((@cmd =~/c/) ? false : true) - : ((@cmd =~/c/) ? true : false) - if @cmd =~/k/ then @use_color=false # useful color off switch, however, k may be used for something else in future + ? ((cmd =~/c/) ? false : true) + : ((cmd =~/c/) ? true : false) + if cmd =~/k/ then @use_color=false # useful color off switch, however, k may be used for something else in future end else @use_color=false end |