Created
August 20, 2018 20:02
-
-
Save dendrochronology/3b7ef2b416b59071cd1cab42e14de275 to your computer and use it in GitHub Desktop.
VS Code shell script to launch friendly-but-uniquely named tmux sessions for each project.
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
#!/usr/bin/env bash | |
# Set terminal.integrated.shell.osx in User Settings to wherever you save this | |
HASH="`pwd | md5`" | |
SESSION="${PWD##*/} ${HASH: -6:6}" | |
SESSION_CLEAN="`echo $SESSION | sed 's/\.//g'`" | |
tmux attach-session -d -t "$SESSION_CLEAN" || tmux new-session -s "$SESSION_CLEAN" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment