mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Do not override "cd" function, use "chpwd" hook instead
This allow the plugin work even w/o using "cd", just by typing directory's name and hitting Enter
This commit is contained in:
parent
e6a354fe65
commit
ac8e14f3ed
1 changed files with 2 additions and 4 deletions
|
|
@ -37,10 +37,8 @@ for wrapsource in "/usr/bin/virtualenvwrapper.sh" "/usr/local/bin/virtualenvwrap
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# New cd function that does the virtualenv magic
|
# Add hook to chpwd function
|
||||||
function cd {
|
add-zsh-hook chpwd _workon_cwd
|
||||||
builtin cd "$@" && _workon_cwd
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue