From 5cd7ad38cbb691c70377b5c82d3de5b0af076164 Mon Sep 17 00:00:00 2001
From: kennyklee <kennyklee@gmail.com>
Date: Mon, 17 Oct 2016 01:00:14 -0700
Subject: Fix regex for optional http(s), and variable reference inside
 osascript.

---
 plugins/droplr/droplr.plugin.zsh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'plugins')

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
-- 
cgit v1.2.3-70-g09d2