Commit 5cd7ad38 authored by kennyklee's avatar kennyklee Committed by Marc Cornellà
Browse files

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

parent cff228e3
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment