summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorkennyklee <kennyklee@gmail.com>2016-10-17 01:00:14 -0700
committerMarc Cornellà <marc.cornella@live.com>2016-10-17 12:41:04 +0200
commit5cd7ad38cbb691c70377b5c82d3de5b0af076164 (patch)
tree82de2ab072b7149b1cfd8406d8fe356a1877eb03 /plugins
parentcff228e342a797b6ac0da7edb431f5f66de79ae4 (diff)
downloadzsh-5cd7ad38cbb691c70377b5c82d3de5b0af076164.tar.gz
zsh-5cd7ad38cbb691c70377b5c82d3de5b0af076164.tar.bz2
zsh-5cd7ad38cbb691c70377b5c82d3de5b0af076164.zip
Fix regex for optional http(s), and variable reference inside osascript.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/droplr/droplr.plugin.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/droplr/droplr.plugin.zsh b/plugins/droplr/droplr.plugin.zsh
index 296a8b98b..af0a21299 100644
--- a/plugins/droplr/droplr.plugin.zsh
+++ b/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