Created
May 23, 2022 10:19
-
-
Save sirvan3tr/f0199094c131b8087a035e1a078851ba to your computer and use it in GitHub Desktop.
zshrc commands to create a Python virtual environment (.venv) and create a Python .gitignore at the same time
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
# Python virtual venv alias | |
alias activate='test -d venv && source ./venv/bin/activate || echo "No Virtualenv in the current folder"' | |
make_python_venv() { | |
echo "Creating .venv environement" | |
test -d venv && echo "Already exists" || python3 -m venv venv; activate | |
echo "Fetching .gitignore file" | |
wget https://raw.githubusercontent.com/sirvan3tr/configs3tr/main/Python.gitignore | |
mv Python.gitignore .gitignore | |
echo "Success" | |
} | |
alias mkenv=make_python_venv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment