diff options
author | Kaleb Elwert <belak@coded.io> | 2017-03-01 15:32:00 -0800 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-05-26 19:05:01 +0200 |
commit | 66cb4005ab6cfcd6b092c1b482e767af214e83bb (patch) | |
tree | 5eb07f5218b2c2b76985ad96a901171aa8a7ea50 | |
parent | c09783c2554e505cc04ef0fc7465341475050947 (diff) | |
download | zsh-66cb4005ab6cfcd6b092c1b482e767af214e83bb.tar.gz zsh-66cb4005ab6cfcd6b092c1b482e767af214e83bb.tar.bz2 zsh-66cb4005ab6cfcd6b092c1b482e767af214e83bb.zip |
Update shrink-path to use cd -q for bypassing the chpwd callbacks
-rw-r--r-- | plugins/shrink-path/shrink-path.plugin.zsh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/shrink-path/shrink-path.plugin.zsh b/plugins/shrink-path/shrink-path.plugin.zsh index f111962a5..e7eed1705 100644 --- a/plugins/shrink-path/shrink-path.plugin.zsh +++ b/plugins/shrink-path/shrink-path.plugin.zsh @@ -94,13 +94,12 @@ shrink_path () { (( tilde )) && dir=${dir/$HOME/\~} tree=(${(s:/:)dir}) ( - unfunction chpwd 2> /dev/null if [[ $tree[1] == \~* ]] { - cd ${~tree[1]} + cd -q ${~tree[1]} result=$tree[1] shift tree } else { - cd / + cd -q / } for dir in $tree; { if (( lastfull && $#tree == 1 )) { @@ -117,7 +116,7 @@ shrink_path () { (( short )) && break done result+="/$part" - cd $dir + cd -q $dir shift tree } echo ${result:-/} |