2017-04-24 23:40:45 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
case $OSTYPE in
|
2017-04-26 11:52:50 -07:00
|
|
|
darwin*) /usr/bin/open "$@" ;;
|
|
|
|
linux*) xdg-open "$@" ;;
|
2017-04-24 23:40:45 -07:00
|
|
|
esac
|
|
|
|
|
2017-04-25 14:20:39 -07:00
|
|
|
# OPTIONAL: requires shell/tmux
|
2017-04-24 23:40:45 -07:00
|
|
|
if command -v 'tmux-session-name' >/dev/null; then
|
|
|
|
# If this was used from a scratch tmux terminal, close it
|
|
|
|
[[ "$(tmux-session-name)" == scratch ]] && tmux kill-session -t scratch
|
|
|
|
fi
|