Created
January 31, 2025 04:24
-
-
Save grahamannett/1ac2441613ed0187e14e07fc01d48c5b to your computer and use it in GitHub Desktop.
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
| # one line function for activating/deactivating venv in bash without having to install any other tools | |
| # only meant to keep on hand for copy+pasting into bashrc when using normal dotfiles is not ideal, for better version in fish see: https://github.com/grahamannett/graham.fish-plugins/blob/main/functions/avenv.fish | |
| function avenv() { if [[ $(type -t deactivate) == function ]]; then deactivate; elif [ -e .venv/bin/activate ]; then source .venv/bin/activate; fi } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment