Skip to content

Instantly share code, notes, and snippets.

@tlockney
Created July 30, 2016 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tlockney/ea3b9528d9c55e100ad0460f3674c3ec to your computer and use it in GitHub Desktop.
Save tlockney/ea3b9528d9c55e100ad0460f3674c3ec to your computer and use it in GitHub Desktop.
function ct
# infer a session name from the current dir and normalize it for a valid tmux session name
set -g session (basename (pwd) | sed 's/[\.\-]/_/g')
tmux attach -t $session; or tmux new-session -s $session
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment