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:
parent
03d2a54bc9
commit
6c6b5b4dcc
1 changed files with 5 additions and 0 deletions
|
@ -58,3 +58,8 @@ nnn_cd ()
|
||||||
}
|
}
|
||||||
|
|
||||||
trap nnn_cd EXIT
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue