Skip to content

Instantly share code, notes, and snippets.

@jpillora
Last active November 28, 2018 13:12
Show Gist options
  • Select an option

  • Save jpillora/bc03f00d97e0dce69763205085ceb7d8 to your computer and use it in GitHub Desktop.

Select an option

Save jpillora/bc03f00d97e0dce69763205085ceb7d8 to your computer and use it in GitHub Desktop.
tmux helper
#tmux helper
echo '#!/bin/bash
NAME="${1}"
if [[ "$NAME" = "" ]]; then
tmux ls
else
tmux attach-session -t "$NAME" || tmux new-session -s "$NAME"
fi' > /usr/local/bin/tm &&
chmod +x /usr/local/bin/tm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment