Permalink
Browse files

Exec args directly. Thanks, eventualbuddha

  • Loading branch information...
1 parent 0b1c6c6 commit 00d338b59e5b919adb0f089144ab69069b9955a9 @indirect committed May 9, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 tm
View
5 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

0 comments on commit 00d338b

Please sign in to comment.