mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
Fix workon_cwd to detect git subtree
In a `git subtree` working directory, `.git` is a file containing a path to the parent git working direcotry. This change attempts to find a virtualenv for a subtree.
This commit is contained in:
parent
e32d4b1e19
commit
a5505119dd
@ -38,7 +38,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
||||
# Get absolute path, resolving symlinks
|
||||
local PROJECT_ROOT="${PWD:A}"
|
||||
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" \
|
||||
&& ! -d "$PROJECT_ROOT/.git" ]]; do
|
||||
&& ! -e "$PROJECT_ROOT/.git" ]]; do
|
||||
PROJECT_ROOT="${PROJECT_ROOT:h}"
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user