diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-09-13 19:14:06 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-09-13 19:14:06 -0400 |
commit | 65e4c0633003a9e3ddbe0aab11909232b61bbdc8 (patch) | |
tree | 6e96a59cced0f135694fc761585a54386d10bfa5 /lib | |
parent | v3: correct sisupod references and path to .txz (replace .zip) (diff) |
v3: options, match fix for --glob / --find
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v3/options.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index ac31a896..dbfe5d79 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -116,7 +116,7 @@ module SiSU_commandline end end def sisu_glob_rules(a) - a=if a.inspect =~/"-\S*[fG]/ \ + a=if a.inspect =~/"-[A-Za-z0-9]*[fG]/ \ or a.inspect =~/"--find"|"--glob"/ b,f=[],[] find_flag=false @@ -138,11 +138,9 @@ module SiSU_commandline r.gsub!(/\|#{@lng_base}\|/,'|') @lang_regx=%r{(?:#{r})} z=if find_flag - if f.length > 0 - b + find_select(find_flag,f) - else - find_all(find_flag,b) - end + (f.length > 0) \ + ? (b + find_select(find_flag,f)) + : find_all(find_flag,b) elsif a.inspect =~/"(?:-\S+?|--\S+?)"/ \ && a.inspect =~/"#{@lang_regx}\/?"/ \ && a.inspect =~/"#{@lng_base}\/\S+?\.ss[tm]"/ |