diff options
Diffstat (limited to 'open-in-browser')
-rwxr-xr-x | open-in-browser | 6 |
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 |