From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Re: brace in alias name and compsys
Date: Sun, 15 Dec 2013 20:38:21 +0000 [thread overview]
Message-ID: <20131215203821.1c3f2b69@pws-pc.ntlworld.com> (raw)
In-Reply-To: <131215115236.ZM20467@torch.brasslantern.com>
On Sun, 15 Dec 2013 11:52:36 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> While we're on the subject, completing after "[" or "[[" in command
> position (no intervening whitespace) incorrectly attempts subscript
> completion. This appears to be a bug somewhere in the internals,
> because compstate[context] has been set to 'subscript' and there's no
> assignment to that in _complete_debug output.
I think it's something like this.
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index e30e0b1..6ed4a0e 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1505,7 +1505,11 @@ get_comp_string(void)
else
nnb = s;
for (tt = s; tt < s + zlemetacs_qsub - wb;) {
- if (*tt == Inbrack) {
+ /*
+ * Ignore '[' at the start of a command as it's not
+ * matched by a closing bracket.
+ */
+ if (*tt == Inbrack && (tt != s || !lincmd)) {
i++;
nb = nnb;
ne = tt;
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next parent reply other threads:[~2013-12-15 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20131215073603.GA97197@redoubt.spodhuis.org>
[not found] ` <131215115236.ZM20467@torch.brasslantern.com>
2013-12-15 20:38 ` Peter Stephenson [this message]
2013-12-15 21:11 ` Peter Stephenson
2013-12-15 21:13 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131215203821.1c3f2b69@pws-pc.ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).