Skip to content

Commit

Permalink
Fix regex for optional http(s), and variable reference inside osascript.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyklee authored and mcornella committed Oct 17, 2016
1 parent cff228e commit 5cd7ad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/droplr/droplr.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cd7ad3

Please sign in to comment.