View .bashrc
This file contains 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
# | |
# Finds the closest virtualenv root directory, starting from $1, and going up to the root. | |
# If the target directory is not specified as an argument, current directory is used. | |
# Prints the virtualenv path found, or nothing otherwise. | |
# | |
function venv_find () { | |
# The cycle is just for the case with broken root folder detection -- never do more than N iterations. | |
venv_root=${1:-"."} | |
venv_found="" |