zsh-workers
 help / color / mirror / code / Atom feed
* Completion in empty double-quotes generates error
@ 2016-03-30 18:06 Bart Schaefer
  2016-04-01  5:36 ` Daniel Shahaf
  0 siblings, 1 reply; 12+ messages in thread
From: Bart Schaefer @ 2016-03-30 18:06 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-05-11 16:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30 18:06 Completion in empty double-quotes generates error Bart Schaefer
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

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).