Last active
October 19, 2019 00:00
-
-
Save mentix02/18c3633f2982b4fdbe63801f360ecd98 to your computer and use it in GitHub Desktop.
This is probably the most complex command I've ever crafted to find the virtual enviornments directory in the user's home directory and activate if an enviornment with the same name as the current directory is found (or fail if not found).
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
source `find /home/$USER -maxdepth 2 -type d -name '.*' 2>/dev/null | grep virtualenv | head -1`/${PWD##*/}/bin/activate |
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
source `find /Users/$USER -maxdepth 2 -type d -name '.*' 2>/dev/null | grep virtualenv | head -1`/${PWD##*/}/bin/activate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment