Created
May 12, 2021 12:06
-
-
Save kiruh/5f7647f492112d9cf18aaa289027f02e to your computer and use it in GitHub Desktop.
direnv
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
eval "$(direnv hook bash)" | |
show_virtual_env() { | |
if [ -n "$VIRTUAL_ENV" ]; then | |
echo "($(basename $VIRTUAL_ENV)) " | |
fi | |
} | |
PS1='$(show_virtual_env)'$PS1 |
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
layout_virtualenv() { | |
local venv_path="$1" | |
source ${venv_path}/bin/activate | |
} |
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
layout virtualenv ~/.virtualenvs/cs | |
unset PS1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment