helm/bin/open
2017-04-26 14:52:50 -04:00

13 lines
331 B
Bash
Executable file

#!/usr/bin/env bash
case $OSTYPE in
darwin*) /usr/bin/open "$@" ;;
linux*) xdg-open "$@" ;;
esac
# 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