mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
shrink-path: match only the beginning of the directory (#6862)
Fixes #6317
This commit is contained in:
parent
2294bae06a
commit
5896c87155
1 changed files with 2 additions and 2 deletions
|
@ -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] == \~* ]] {
|
||||
|
|
Loading…
Reference in a new issue