diff options
Diffstat (limited to 'lib/sisu/v3/screen_text_color.rb')
-rw-r--r-- | lib/sisu/v3/screen_text_color.rb | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/sisu/v3/screen_text_color.rb b/lib/sisu/v3/screen_text_color.rb index 67022087..cef15585 100644 --- a/lib/sisu/v3/screen_text_color.rb +++ b/lib/sisu/v3/screen_text_color.rb @@ -69,16 +69,11 @@ module SiSU_Screen @color_instruct=txt[0] flag=SiSU_Env::InfoProcessingFlag.new if @cmd - if flag.color #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=if @cmd =~/c/; false - else true - end - else - @use_color=if @cmd =~/c/; true - else false - end - end - if @cmd =~/k/; @use_color=false + #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 end else @use_color=false end |