Last active
August 29, 2015 14:05
-
-
Save medina/6802d9be1caa46b53fbd to your computer and use it in GitHub Desktop.
virtualenv hooks
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 | |
# This hook is sourced after every virtualenv is activated. | |
if [[ ! -z ${TMUX} ]]; | |
then | |
venv=$(basename $VIRTUAL_ENV) | |
_TMUX_OLD_WINDOW=$(tmux display-message -p "#W") | |
tmux rename-window "$venv" | |
fi |
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 | |
# This hook is sourced after every virtualenv is deactivated. | |
if [[ ! -z ${TMUX} && ! -z ${_TMUX_OLD_WINDOW} ]]; | |
then | |
tmux rename-window "${_TMUX_OLD_WINDOW}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment