diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-17 23:05:37 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-17 23:05:37 +0100 |
commit | f2f26c40f6dc434ff11147de0f7a8de2c8194e00 (patch) | |
tree | 6343f5eae8ce7813c231ac68d861a813c8d7c277 /etc | |
parent | 668ac12684cedb7aa9297729b61bd4ad2c40d30f (diff) |
rtab: Eliminate problems with "wrong" named directories
example: hash -d www=/var/ww; cd /var/www; rtab
-> rtab would try to cd ~~wwww or something, and fail
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/functions/rtab | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/functions/rtab b/etc/functions/rtab index 920f881..46b315a 100755 --- a/etc/functions/rtab +++ b/etc/functions/rtab @@ -64,7 +64,7 @@ typeset -i i 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/\~} |