Add function of chpwd
FranklinYu opened this issue · comments
Franklin Yu commented
chpwd
is also a hook function supported by Zsh. Is there any plan to support it?
Ryan Caloras commented
No plans currently. A naive solution I could think of would probably do something like watch $OLDPWD
for any changes on precmd, and if so invoke any chpwd functions set inside a function array.
Doesn't sound too difficult. Feel free to submit a PR @FranklinYu if interested :)
Michael Diamond commented
I imagine you could implement a chpwd
hook on top of bash-preexec as is :) Not that it's a bad idea to support directly, but it's not strictly necessary either.