Load python env if inside tmux session automatically

Check if you are in a tmux session and if there is a .env directory. If there is activate the python environment
This commit is contained in:
CronyAkatsuki 2023-10-22 11:34:46 +02:00
parent 03d2a54bc9
commit 6c6b5b4dcc

View File

@ -58,3 +58,8 @@ nnn_cd ()
}
trap nnn_cd EXIT
# Check if in tmux and if a venv directory exists activate the python environment
if [ ! -z "$TMUX" ] && [ -d "./env" ]; then
. ./env/bin/activate
fi