c09783c2554e505cc04ef0fc7465341475050947

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Revert "unset chpwd_functions before running cd ... (#6830)"

This reverts commit 3dab7e46e8815838c8099040e11a7ae9a30ba03d.

Diff

 1diff --git a/plugins/shrink-path/shrink-path.plugin.zsh b/plugins/shrink-path/shrink-path.plugin.zsh
 2index 6dd6a930f751cefa883696e193b575b5ebf6703e..f111962a57aa839a8649da7a298613a90ea0982a 100644
 3--- a/plugins/shrink-path/shrink-path.plugin.zsh
 4+++ b/plugins/shrink-path/shrink-path.plugin.zsh
 5@@ -94,11 +94,6 @@ shrink_path () {
 6         (( tilde )) && dir=${dir/$HOME/\~}
 7         tree=(${(s:/:)dir})
 8         (
 9-                # unset chpwd_functions since we'll be calling `cd` and don't
10-                # want any side-effects (eg., if the user was using auto-ls)
11-                chpwd_functions=()
12-                # unset chpwd since even if chpwd_functions is (), zsh will
13-                # attempt to execute chpwd
14                 unfunction chpwd 2> /dev/null
15                 if [[ $tree[1] == \~* ]] {
16                         cd ${~tree[1]}