helm/bin/open

13 lines
331 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
case $OSTYPE in
2017-04-26 11:52:50 -07:00
darwin*) /usr/bin/open "$@" ;;
linux*) xdg-open "$@" ;;
esac
2017-04-25 14:20:39 -07:00
# OPTIONAL: requires shell/tmux
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