mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Use zsh-builtin parameter expansion instead of cd -P
This commit is contained in:
parent
403859ae80
commit
679c66cc83
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
||||||
# Look for a proper PROJECT_ROOT path
|
# Look for a proper PROJECT_ROOT path
|
||||||
PROJECT_ROOT=`pwd`
|
PROJECT_ROOT=`pwd`
|
||||||
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do
|
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do
|
||||||
PROJECT_ROOT=$(cd -P "$PROJECT_ROOT/.."; pwd)
|
PROJECT_ROOT=${PROJECT_ROOT:A:h}
|
||||||
done
|
done
|
||||||
if [[ "$PROJECT_ROOT" == "/" ]]; then
|
if [[ "$PROJECT_ROOT" == "/" ]]; then
|
||||||
PROJECT_ROOT="."
|
PROJECT_ROOT="."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue