Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

bashcompinit incorrectly calculates COMP_LINE (proposed fix included)

Hi all,

A user discovered a bug in bashcompinit that causes COMP_LINE to be
incorrectly calculated. A summary of the incorrect behaviour is here:
(Note some of the surrounding discussion is incorrect - this bug is
unrelated to unicode.) The table at the bottom of this comment summarises
how bashcompinit differs in its calculation of COMP_POINT.

The change that caused the bug appears to have been introduced here:

Reverting this line (i.e. using CURRENT-1 instead of CURRENT, as it was
before this commit) fixes the bug for me, causing zsh to report 18 and 19
for the two test lines respectively, matching Bash.

I am not a subscriber; please send responses to this email address. I wish
to note the resolution of this on the argcomplete ticket.



Messages sorted by: Reverse Date, Date, Thread, Author