From 5cd7ad38cbb691c70377b5c82d3de5b0af076164 Mon Sep 17 00:00:00 2001 From: kennyklee Date: Mon, 17 Oct 2016 01:00:14 -0700 Subject: [PATCH] Fix regex for optional http(s), and variable reference inside osascript. --- plugins/droplr/droplr.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/droplr/droplr.plugin.zsh b/plugins/droplr/droplr.plugin.zsh index 296a8b98b..af0a21299 100644 --- a/plugins/droplr/droplr.plugin.zsh +++ b/plugins/droplr/droplr.plugin.zsh @@ -7,8 +7,8 @@ droplr() { return 1 fi - if [[ "$1" =~ ^http[|s]:// ]]; then - osascript -e "tell app 'Droplr' to shorten '$1'" + if [[ "$1" =~ ^https?:// ]]; then + osascript -e 'tell app "Droplr" to shorten "'"$1"'"' else open -ga /Applications/Droplr.app "$1" fi