Last active
December 2, 2017 03:17
-
-
Save jhunt/9a7275a0967c434a210d0ce8fbd58ba0 to your computer and use it in GitHub Desktop.
tmux.sh
This file contains 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
#!/bin/bash | |
set -x | |
if [[ -z $TMUX ]]; then | |
echo "Not in TMUX; starting one up" | |
exec tmux new-session -s tmux-test -n bosh \ | |
$0 "$@" \; \ | |
attach | |
exit 1 | |
fi | |
echo "In TMUX: running stuff" | |
for x in $(seq 1 10); do | |
echo $x | |
sleep 1 | |
done | |
echo "BOOM" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment