5cd7ad38cbb691c70377b5c82d3de5b0af076164
- Author
- kennyklee <kennyklee@gmail.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Fix regex for optional http(s), and variable reference inside osascript.
Diff
1diff --git a/plugins/droplr/droplr.plugin.zsh b/plugins/droplr/droplr.plugin.zsh
2index 296a8b98b00328294571b012df369e581206316e..af0a21299062729ef24dbbe15492d362d78af63f 100644
3--- a/plugins/droplr/droplr.plugin.zsh
4+++ b/plugins/droplr/droplr.plugin.zsh
5@@ -7,8 +7,8 @@ droplr() {
6 return 1
7 fi
8
9- if [[ "$1" =~ ^http[|s]:// ]]; then
10- osascript -e "tell app 'Droplr' to shorten '$1'"
11+ if [[ "$1" =~ ^https?:// ]]; then
12+ osascript -e 'tell app "Droplr" to shorten "'"$1"'"'
13 else
14 open -ga /Applications/Droplr.app "$1"
15 fi