summaryrefslogtreecommitdiff
path: root/open-in-browser
diff options
context:
space:
mode:
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