summaryrefslogtreecommitdiff
path: root/open-in-browser
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2017-12-12 00:41:11 +0100
committerPatrick Simianer <p@simianer.de>2017-12-12 00:41:11 +0100
commita43b48b5e61078c3472a97a413988f9853fe3115 (patch)
treeb2452e368264964abf701b141b4e421510fc007a /open-in-browser
parent1e7126b7b3f0de75d1c8af5c6e52a3cc48bc373d (diff)
open-in-browser: fix
Diffstat (limited to 'open-in-browser')
-rwxr-xr-xopen-in-browser6
1 files changed, 5 insertions, 1 deletions
diff --git a/open-in-browser b/open-in-browser
index b66c590..bb30c64 100755
--- a/open-in-browser
+++ b/open-in-browser
@@ -1,7 +1,11 @@
#!/usr/bin/env zsh
if [[ $(uname) == "Darwin" ]]; then
- osascript -e "tell application \"Firefox\" to open location \"$1\""
+ if [[ $1 == http://* || $1 == https://* ]]; then
+ osascript -e "tell application \"Firefox\" to open location \"$1\""
+ else
+ open -a Firefox $1
+ fi
else
firefox "$1" &>/dev/null &
fi