Zsh Mailing List Archive
Messages sorted by:
Completion in empty double-quotes generates error
- X-seq: zsh-workers 38225
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Completion in empty double-quotes generates error
- Date: Wed, 30 Mar 2016 11:06:52 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:to:subject:mime-version; bh=f0XWUbLjfmrV4CSVW6KWc9pkFGGjtwzOlSGQRLdcVRU=; b=I0wN7pmXWpNNWsXs69VSsJ31SRYdpATUxuRB+aBVY1Oe+kppdkLfdUyC2CTmo/yC8P Wrx/NMq7dd2w0W+XPrFNfj5snbpT0utNWG9IbQld5mAeXx+pG/s4GcqaRyT7VadeWHF2 t42J56mlzLooD55rPW+aLO1fHxjXPpBgHHCUcIfMm8EOAG3FIbc7zYkRPFrbp+2IOUWI zKB40jOOXdGKQGsMC94JSbaYxUZpbxIoCTMrD02AY/QzR9dfAGsXmgXcSU1cljE5MeYJ B06Ukxp7653RQtZbU5WNJ0vzsCVaOGKo5hUOl/ecJDJVKff6BFyIJVBGAYWLKhn0+oE5 v7CQ==
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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 ""
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!
If there is even one other character inside the quotes before completing, no
error is reported.
Messages sorted by: