Add directory name to venv prompt
This commit is contained in:
parent
16a81879ce
commit
4afbecf78c
|
@ -2,7 +2,8 @@
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [python39 poetry git];
|
nativeBuildInputs = with pkgs; [python39 poetry git];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
[ -e .venv/bin/python3 ] && VENV_FLAG="--upgrade" || VENV_FLAG="--clear"; python3 -m venv $VENV_FLAG .venv
|
export PROJECT_NAME=$(basename $(readlink -f .))
|
||||||
|
[ -e .venv/bin/python3 ] && VENV_FLAG="--upgrade" || VENV_FLAG="--clear --prompt $PROJECT_NAME"; python3 -m venv $VENV_FLAG .venv
|
||||||
[ -e .venv/bin/activate ] && source .venv/bin/activate
|
[ -e .venv/bin/activate ] && source .venv/bin/activate
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue