Skip to content

Commit

Permalink
fix: didn't escape the shell words in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
willbchang committed Jun 5, 2020
1 parent 3700e5d commit 0217aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
filepath = ARGV[0]
# Remove single quote around file path when selecting from Alfred File Browser
filepath = /^'.*'$/.match?(filepath) ? filepath[1..-2] : filepath
system "open -a #{editor} #{filepath.shellescape}"
system "open -a #{editor.shellescape} #{filepath.shellescape}"

0 comments on commit 0217aed

Please sign in to comment.