diff --git a/plugins/shrink-path/shrink-path.plugin.zsh b/plugins/shrink-path/shrink-path.plugin.zsh index e7eed1705..29e6f0deb 100644 --- a/plugins/shrink-path/shrink-path.plugin.zsh +++ b/plugins/shrink-path/shrink-path.plugin.zsh @@ -88,10 +88,10 @@ shrink_path () { if (( named )) { for part in ${(k)nameddirs}; { - [[ $dir == ${nameddirs[$part]}(/*|) ]] && dir=${dir/${nameddirs[$part]}/\~$part} + [[ $dir == ${nameddirs[$part]}(/*|) ]] && dir=${dir/#${nameddirs[$part]}/\~$part} } } - (( tilde )) && dir=${dir/$HOME/\~} + (( tilde )) && dir=${dir/#$HOME/\~} tree=(${(s:/:)dir}) ( if [[ $tree[1] == \~* ]] {