From 00d338b59e5b919adb0f089144ab69069b9955a9 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 8 May 2010 18:51:18 -0700 Subject: [PATCH] Exec args directly. Thanks, eventualbuddha --- tm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tm b/tm index 475309c..e8d8b63 100755 --- a/tm +++ b/tm @@ -5,8 +5,7 @@ proj_files = ARGV.map do |a| end if ARGV.any? && proj_files.all?{|p| File.exist?(p) } - exec %|open "#{proj_files.join('" "')}"| + exec 'open', *proj_files else - bash_args = ARGV.map{|s| s.gsub(' ', '\\ ') } - exec %|mate #{bash_args.join(" ")}| + exec 'mate', *ARGV end