From 0bd17c97aa19fb4a03c27e07d9e0a631b560b9f6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Oct 2014 19:15:10 -0400 Subject: v5 v6: cleaning, minor --- lib/sisu/v6/hub_options.rb | 51 ---------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'lib/sisu/v6/hub_options.rb') diff --git a/lib/sisu/v6/hub_options.rb b/lib/sisu/v6/hub_options.rb index 0cb0d336..7ed7645f 100644 --- a/lib/sisu/v6/hub_options.rb +++ b/lib/sisu/v6/hub_options.rb @@ -505,57 +505,6 @@ module SiSU_Commandline end s.strip! end - def expand_numeric_shortcuts_(a) - shortcut=SiSU_Env::InfoProcessingFlag.new - s='' - a.each do |x| - y=case x - when /0/ - (x=~/^-0\S+/) \ - ? x.gsub(/^-0(\S+)/,shortcut.act_0.str + ' -\1') - : x.gsub(/^-0/,shortcut.act_0.str + ' ') - when /1/ - (x=~/^-1\S+/) \ - ? x.gsub(/^-1(\S+)/,shortcut.act_1.str + ' -\1') - : x.gsub(/^-1/,shortcut.act_1.str + ' ') - when /2/ - (x=~/^-2\S+/) \ - ? x.gsub(/^-2(\S+)/,shortcut.act_2.str + ' -\1') - : x.gsub(/^-2/,shortcut.act_2.str + ' ') - when /3/ - (x=~/^-3\S+/) \ - ? x.gsub(/^-3(\S+)/,shortcut.act_3.str + ' -\1') - : x.gsub(/^-3/,shortcut.act_3.str + ' ') - when /4/ - (x=~/^-4\S+/) \ - ? x.gsub(/^-4(\S+)/,shortcut.act_4.str + ' -\1') - : x.gsub(/^-4/,shortcut.act_4.str + ' ') - when /5/ - (x=~/^-5\S+/) \ - ? x.gsub(/^-5(\S+)/,shortcut.act_5.str + ' -\1') - : x.gsub(/^-5/,shortcut.act_5.str + ' ') - when /6/ - (x=~/^-6\S+/) \ - ? x.gsub(/^-6(\S+)/,shortcut.act_6.str + ' -\1') - : x.gsub(/^-6/,shortcut.act_6.str + ' ') - when /7/ - (x=~/^-7\S+/) \ - ? x.gsub(/^-7(\S+)/,shortcut.act_7.str + ' -\1') - : x.gsub(/^-7/,shortcut.act_7.str + ' ') - when /8/ - (x=~/^-8\S+/) \ - ? x.gsub(/^-8(\S+)/,shortcut.act_8.str + ' -\1') - : x.gsub(/^-8/,shortcut.act_8.str + ' ') - when /9/ - (x=~/^-9\S+/) \ - ? x.gsub(/^-9(\S+)/,shortcut.act_9.str + ' -\1') - : x.gsub(/^-9/,shortcut.act_9.str + ' ') - else x - end - s << " #{y}" unless y.empty? - end - s.strip! - end def opt_cmd_and_mod_adjust(ch,select_arr,files) select_arr=select_arr.flatten sel_init=select_arr.flatten -- cgit v1.2.3 From 97864e99d0819efdd3916f11f16cca058438ffc4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Oct 2014 19:20:08 -0400 Subject: v5 v6: --act provides info on current --act0 to --act9 settings * makes it easier to make use of acts 0 to 9 --- lib/sisu/v6/hub_options.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/sisu/v6/hub_options.rb') diff --git a/lib/sisu/v6/hub_options.rb b/lib/sisu/v6/hub_options.rb index 7ed7645f..f8085c6c 100644 --- a/lib/sisu/v6/hub_options.rb +++ b/lib/sisu/v6/hub_options.rb @@ -511,7 +511,7 @@ module SiSU_Commandline shortcut=SiSU_Env::InfoProcessingFlag.new if files ==:true if not sel_init.empty? \ - and sel_init.inspect =~/"--act[0-9]/ + and sel_init.inspect =~/"--act[s0-9]?/ sel_init.each do |s| select_arr <<=case s when /--act0/ then shortcut.act_0.arr @@ -524,6 +524,7 @@ module SiSU_Commandline when /--act7/ then shortcut.act_7.arr when /--act8/ then shortcut.act_8.arr when /--act9/ then shortcut.act_9.arr + when /--act/ then shortcut.act_info end end end @@ -688,6 +689,11 @@ module SiSU_Commandline end end else + if not sel_init.empty? \ + and sel_init.inspect =~/"--acts?/ + shortcut.act_info + exit + end if ch =~/c/ then select_arr << '--color-toggle' ch=ch.gsub(/[c]/,'') end -- cgit v1.2.3