diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v3/hub.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v3/options.rb | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index c4eed640..6fa69753 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -501,10 +501,8 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on def do_initialization @cX=SiSU_Screen::Ansi.new(@opt.cmd).cX flag=SiSU_Env::InfoProcessingFlag.new - if @opt.cmd =~/[vVM]/ #% version information - unless @opt.files.empty? - SiSU_Help::Help.new('env',@opt).sisu_version - end + if @opt.act[:version_info][:set]==:on #% version information + SiSU_Help::Help.new('env',@opt).sisu_version end if @opt.act[:license][:set]==:on #% license information SiSU_Help::Help.new('license',@opt).help_request diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 7aa3622d..5871d8db 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -509,6 +509,12 @@ module SiSU_Commandline { bool: false, set: :off } else { bool: true, set: :na } #fix default color end + act[:version_info]=if cmd =~/[vVM]/ \ + || mod.inspect =~/"--verbose"|"--maintenance"/ + { bool: true, set: :on } + else + { bool: false, set: :na } + end # act[:color_toggle]=if cmd =~/c/ \ # or mod.inspect =~/"--color-toggle"/ # true |