From 0217aed3779f5f84997911157aad1de5bbd90d95 Mon Sep 17 00:00:00 2001 From: Will B Chang Date: Fri, 5 Jun 2020 10:56:47 +0800 Subject: [PATCH] fix: didn't escape the shell words in editor --- script.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.rb b/script.rb index 9858610..9a9b8c2 100644 --- a/script.rb +++ b/script.rb @@ -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}" \ No newline at end of file +system "open -a #{editor.shellescape} #{filepath.shellescape}"