bin/columnform in tefil-0.1.3 vs bin/columnform in tefil-0.1.4

- old
+ new

@@ -13,13 +13,16 @@ OPTIONS = {:separator => ' '} op = OptionParser.new op.banner = [ "Usage: #{File.basename("#{__FILE__}")} [options] [files]", ].join("\n") -op.on("-o" , "--overwrite" , "Overwrite."){ OPTIONS[:overwrite] = true} -op.on("-s char", "--separator=char", "Indicate separator."){|val| OPTIONS[:separator] = val} -op.on("-l" , "--left-alline" , "Left alline."){ OPTIONS[:left] = true} +op.on("-o" , "--overwrite" , "Overwrite"){ OPTIONS[:overwrite] = true} +op.on("-s char", "--separator=char", "Indicate separator"){|val| OPTIONS[:separator] = val} +op.on("-l" , "--left-just" , "Left justified (Default)" ){ OPTIONS[:just] = :left} +op.on("-r" , "--right-just" , "Right justified"){ OPTIONS[:just] = :right} op.parse!(ARGV) +## default settings OPTIONS[:overwrite] ||= false +OPTIONS[:just] ||= :left Tefil::ColumnFormer.new(OPTIONS).filter(ARGV)