Browse Source

Fix regex for optional http(s), and variable reference inside osascript.

kennyklee 7 years ago
parent
commit
5cd7ad38cb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      plugins/droplr/droplr.plugin.zsh

+ 2 - 2
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