Last active
December 21, 2017 22:09
-
-
Save rgruesbeck/ead07be89279027bc17029d672d47c7e to your computer and use it in GitHub Desktop.
tmux helper function that works well with teamocil
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
mux () { | |
# tmux helper function | |
templates="/home/ron/.teamocil/" | |
if [ -z $1 ] | |
then | |
echo "Sessions:" | |
tmux ls | |
echo "" | |
echo "Templates:" | |
ls $templates | |
else | |
tmux attach -t $1 || { [ -f "$templates/$1.yml" ] && tmux new-session teamocil $1 } || tmux new-session -s $1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment