* zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is set
@ 2013-12-30 14:50 Martin Birgmeier
2013-12-30 19:17 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Martin Birgmeier @ 2013-12-30 14:50 UTC (permalink / raw)
To: zsh-workers
Hi,
I am running zsh-5.0.4 on FreeBSD (from FreeBSD ports). CDPATH is set to
".:/usr/src/contrib:/usr/src/bin:/usr/src/sbin:/usr/src/sbin/i386:/usr/src/usr.bin:/usr/src/usr.sbin:/usr/src/lib:/usr/src/sys/modules:/usr/src/libexec:/usr/src/share:/usr/src/gnu/usr.bin:/usr/src/gnu/usr.sbin:/usr/src/gnu/lib:/usr/src/gnu/games:/usr/src"
Since the upgrade to 5.0.4, whenever I type (in any directory)
# cd ../<TAB>
then instead of autocompleting the entries in .., I get all entries in
all of the CDPATH components. This behaved correctly with the previous
version of zsh (from FreeBSD ports), which was 5.0.2_1.
Could you please correct this regression.
Regards,
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is set
2013-12-30 14:50 zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is set Martin Birgmeier
@ 2013-12-30 19:17 ` Bart Schaefer
2013-12-30 20:20 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2013-12-30 19:17 UTC (permalink / raw)
To: zsh-workers
On Dec 30, 3:50pm, Martin Birgmeier wrote:
}
} Since the upgrade to 5.0.4, whenever I type (in any directory)
}
} # cd ../<TAB>
}
} then instead of autocompleting the entries in .., I get all entries in
} all of the CDPATH components.
My apologies.
diff --git a/Completion/Zsh/Command/_cd b/Completion/Zsh/Command/_cd
index b9860ff..0b48842 100644
--- a/Completion/Zsh/Command/_cd
+++ b/Completion/Zsh/Command/_cd
@@ -63,7 +63,7 @@ else
fi
fi
- if [[ $PREFIX != (\~|/|./|../)* ]]; then
+ if [[ $PREFIX != (\~|/|./|../)* && -z $tmpWpath ]]; then
local tmpcdpath alt
alt=()
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is set
2013-12-30 19:17 ` Bart Schaefer
@ 2013-12-30 20:20 ` Bart Schaefer
0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2013-12-30 20:20 UTC (permalink / raw)
To: zsh-workers
On Dec 30, 11:17am, Bart Schaefer wrote:
} Subject: Re: zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is
}
} On Dec 30, 3:50pm, Martin Birgmeier wrote:
} }
} } Since the upgrade to 5.0.4, whenever I type (in any directory)
} }
} } # cd ../<TAB>
} }
} } then instead of autocompleting the entries in .., I get all entries in
} } all of the CDPATH components.
}
} - if [[ $PREFIX != (\~|/|./|../)* ]]; then
} + if [[ $PREFIX != (\~|/|./|../)* && -z $tmpWpath ]]; then
... in which case the reference to tmpWpath in that block would not be
needed at all. Hmm. That's not right. What we want is more like:
diff --git a/Completion/Zsh/Command/_cd b/Completion/Zsh/Command/_cd
index b9860ff..6b8d7eb 100644
--- a/Completion/Zsh/Command/_cd
+++ b/Completion/Zsh/Command/_cd
@@ -63,7 +63,7 @@ else
fi
fi
- if [[ $PREFIX != (\~|/|./|../)* ]]; then
+ if [[ $PREFIX != (\~|/|./|../)* && $IPREFIX != ../* ]]; then
local tmpcdpath alt
alt=()
So please ignore 32203.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is set
@ 2013-12-31 13:56 Martin Birgmeier
0 siblings, 0 replies; 4+ messages in thread
From: Martin Birgmeier @ 2013-12-31 13:56 UTC (permalink / raw)
To: zsh-workers
Thank you for the fix.
Regards,
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-31 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-30 14:50 zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is set Martin Birgmeier
2013-12-30 19:17 ` Bart Schaefer
2013-12-30 20:20 ` Bart Schaefer
2013-12-31 13:56 Martin Birgmeier
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).