Skip to content

Commit

Permalink
Exec args directly. Thanks, eventualbuddha
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed May 9, 2010
1 parent 0b1c6c6 commit 00d338b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tm
Expand Up @@ -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.