From c10a6dcb74bfcd13e5e0897cb5d92e8e471e99e1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Aug 2014 00:14:17 -0400 Subject: v6: commandline, --act0 to --act9, rc-config with flag:act[0-9] * configurable command line options increased to 0 - 9 (instead of 0 - 5) * use --act0 to --act9 (previous flags -1 to -5; -0 to -9 now available) * default --act0 * rc config with flag:act0 to flag:act9 (previously roman numerals) * legacy roman numeral configuration works (for now) --- lib/sisu/v6/hub_options.rb | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 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 f851b985..94e886dc 100644 --- a/lib/sisu/v6/hub_options.rb +++ b/lib/sisu/v6/hub_options.rb @@ -460,32 +460,44 @@ module SiSU_Commandline y=case x when /0/ (x=~/^-0\S+/) \ - ? x.gsub(/^-0(\S+)/,shortcut.cf_0 + ' -\1') - : x.gsub(/^-0/,shortcut.cf_0 + ' ') + ? 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.cf_1 + ' -\1') - : x.gsub(/^-1/,shortcut.cf_1 + ' ') + ? 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.cf_2 + ' -\1') - : x.gsub(/^-2/,shortcut.cf_2 + ' ') + ? 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.cf_3 + ' -\1') - : x.gsub(/^-3/,shortcut.cf_3 + ' ') + ? 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.cf_4 + ' -\1') - : x.gsub(/^-4/,shortcut.cf_4 + ' ') + ? 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.cf_5 + ' -\1') - : x.gsub(/^-5/,shortcut.cf_5 + ' ') + ? 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.cf_5 + ' -\1') - : x.gsub(/^-6/,shortcut.cf_5 + ' ') + ? 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? -- cgit v1.2.3