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

master
kennyklee 10 years ago committed by Marc Cornellà
parent cff228e342
commit 5cd7ad38cb
  1. 4
      plugins/droplr/droplr.plugin.zsh

@ -7,8 +7,8 @@ droplr() {
return 1 return 1
fi fi
if [[ "$1" =~ ^http[|s]:// ]]; then if [[ "$1" =~ ^https?:// ]]; then
osascript -e "tell app 'Droplr' to shorten '$1'" osascript -e 'tell app "Droplr" to shorten "'"$1"'"'
else else
open -ga /Applications/Droplr.app "$1" open -ga /Applications/Droplr.app "$1"
fi fi

Loading…
Cancel
Save