Skip to content

Commit

Permalink
Add function to destroy venv
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ggs committed Feb 22, 2024
1 parent 754a664 commit d57c668
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ povenvpath() {
poetry env info | awk '/^Path:/{print $2; exit}'
}

podestroyvenv() {
deactivate 2> /dev/null
local venvpath=$(povenvpath)
if [[ -n "$venvpath" ]]; then
rm -rf "$venvpath"
else
echo "No venv found"
fi
}

alias van='python3 -m venv venv'
alias vac='source venv/bin/activate'
alias vad='deactivate'
Expand Down

0 comments on commit d57c668

Please sign in to comment.