mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Use chpwd hook instead of overriding cd command
This commit is contained in:
parent
c35e31a278
commit
32bacf8d02
1 changed files with 2 additions and 4 deletions
|
|
@ -37,10 +37,8 @@ if [[ -f "$wrapsource" ]]; then
|
|||
fi
|
||||
}
|
||||
|
||||
# New cd function that does the virtualenv magic
|
||||
function cd {
|
||||
builtin cd "$@" && _workon_cwd
|
||||
}
|
||||
# Add hook to chpwd function
|
||||
add-zsh-hook chpwd _workon_cwd
|
||||
fi
|
||||
else
|
||||
print "zsh virtualenvwrapper plugin: Cannot find virtualenvwrapper_lazy.sh. Please install with \`pip install virtualenvwrapper\`."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue