66cb4005ab6cfcd6b092c1b482e767af214e83bb
- Author
- Kaleb Elwert <belak@coded.io>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Update shrink-path to use cd -q for bypassing the chpwd callbacks
Diff
1diff --git a/plugins/shrink-path/shrink-path.plugin.zsh b/plugins/shrink-path/shrink-path.plugin.zsh
2index f111962a57aa839a8649da7a298613a90ea0982a..e7eed1705077c795cf7b8200d737916eec153e22 100644
3--- a/plugins/shrink-path/shrink-path.plugin.zsh
4+++ b/plugins/shrink-path/shrink-path.plugin.zsh
5@@ -94,13 +94,12 @@ shrink_path () {
6 (( tilde )) && dir=${dir/$HOME/\~}
7 tree=(${(s:/:)dir})
8 (
9- unfunction chpwd 2> /dev/null
10 if [[ $tree[1] == \~* ]] {
11- cd ${~tree[1]}
12+ cd -q ${~tree[1]}
13 result=$tree[1]
14 shift tree
15 } else {
16- cd /
17+ cd -q /
18 }
19 for dir in $tree; {
20 if (( lastfull && $#tree == 1 )) {
21@@ -117,7 +116,7 @@ shrink_path () {
22 (( short )) && break
23 done
24 result+="/$part"
25- cd $dir
26+ cd -q $dir
27 shift tree
28 }
29 echo ${result:-/}