2017-04-24 23:40:45 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
case $OSTYPE in
|
|
|
|
darwin*) open $@ ;;
|
|
|
|
linux*) xdg-open $@ ;;
|
|
|
|
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
|