helm/bin/open
2017-04-25 17:20:39 -04:00

13 lines
318 B
Bash
Executable file

#!/usr/bin/env bash
case $OSTYPE in
darwin*) 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