From e1ec4bd2dad2bd22ad97cea398ae1cfcfae183a2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 15 Oct 2007 19:27:16 +0100 Subject: mostly the arrangement of conditionals --- lib/sisu/v0/options.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v0/options.rb') diff --git a/lib/sisu/v0/options.rb b/lib/sisu/v0/options.rb index a4cdc5e4..39de0530 100644 --- a/lib/sisu/v0/options.rb +++ b/lib/sisu/v0/options.rb @@ -97,7 +97,8 @@ module SiSU_commandline s.strip! # String.strip is broken in ruby 1.9.0 (2007-09-10 patchlevel 0) [i486-linux], 2007-09-18:38/2 a=s.split(/\s+/) a.each do |x| - if x =~/^-[a-z0-5]+/i or x =~/^--\S+/ + if x =~/^-[a-z0-5]+/i \ + or x =~/^--\S+/ if x =~/^-([a-z0-5]+)/i; c << $1 end if x =~/^--\S+/; m << x @@ -141,7 +142,9 @@ module SiSU_commandline end @files << f @files.flatten! - if @files.length > 0 and @cmd.empty? and @mod.length == 0 #% if no other action called on filename given, default is sisu -0 [filename(s)] configured as flag default + if @files.length > 0 \ + and @cmd.empty? \ + and @mod.length == 0 #% if no other action called on filename given, default is sisu -0 [filename(s)] configured as flag default @cmd=shortcut.cf_0 end tell=SiSU_Screen::Ansi.new(@cmd,"\tsisu " + @cmd + ' ' + @mod.join(' ') + ' ' + @files.join(' ') + "\n") -- cgit v1.2.3