diff options
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]"/ |