Created
February 17, 2024 08:51
-
-
Save YuanLiou/b91fa876825e947bc40ee84ab6984e44 to your computer and use it in GitHub Desktop.
use Tmux only if current term program is Apple Terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use Tmux only if current term program is Apple Terminal | |
if [ "$TERM_PROGRAM" = 'Apple_Terminal' ]; then | |
tmux has -t hack &> /dev/null | |
if [ $? != 0 ]; then | |
tmux new -s hack | |
elif [ -z $TMUX ]; then | |
tmux attach -t hack | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment