zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Completion in empty double-quotes generates error
Date: Wed, 30 Mar 2016 11:06:52 -0700	[thread overview]
Message-ID: <160330110652.ZM1432@torch.brasslantern.com> (raw)

About six years ago, I wrote:
} If I invoke quote-and-complete-word via execute-named-command on an
} empty buffer, I get this:
} 
} schaefer<525> 11: ../../../zsh-4.0/Src/Zle/zle_tricky.c:661: BUG: 0 <= wb <=
} zlemetacs <= we is not true!
} 
} The same error does not occur when invoking it via a direct binding.

Well, now it DOES occur when invoking via direct binding.  The error
message has gotten a bit more informative.

---------------
torch% autoload quote-and-complete-word 
torch% zle -N quote-and-complete-word
torch% bindkey '\t' quote-and-complete-word
torch% ls <TAB>
torch% ls 10: ../../../zsh-5.0/Src/Zle/zle_tricky.c:658: BUG: 0 <= wb (3) <= zlemetacs (2) <= we (3) is not true!
""     ls ""
(listing here)
---------------

The "10:" would seem to imply that the error comes from the first call to
"zle complete-word" in quote-and-complete-word, but if I simplify the
function down to just that I don't get the error.

Further experimentation reveals that starting from a clean "compinit" I can
generate the error by completing inside empty double quotes"

torch% ls ""<backward-char><complete-word>
torch% ls " ../../../zsh-5.0/Src/Zle/zle_tricky.c:658: BUG: 0 <= wb (3) <= zlemetacs (2) <= we (3) is not true!
       ls ""

If there is even one other character inside the quotes before completing, no
error is reported.


             reply	other threads:[~2016-03-30 18:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 18:06 Bart Schaefer [this message]
2016-04-01  5:36 ` Daniel Shahaf
2016-04-02  1:18   ` Bart Schaefer
2016-04-02  3:29     ` Daniel Shahaf
2016-04-02  6:20       ` Bart Schaefer
2016-04-02 18:18         ` Bart Schaefer
2016-04-06 19:10           ` Bart Schaefer
2016-05-10 18:40             ` Daniel Shahaf
2016-05-10 20:13               ` Bart Schaefer
2016-05-10 21:00                 ` Bart Schaefer
2016-05-11 16:21                   ` Daniel Shahaf
2016-05-10 21:29                 ` Mikael Magnusson

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=160330110652.ZM1432@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).