From: Evan Underscore <evanunderscore@gmail.com>
To: zsh-workers@zsh.org
Subject: bashcompinit incorrectly calculates COMP_LINE (proposed fix included)
Date: Fri, 17 Nov 2017 20:19:25 +1100 [thread overview]
Message-ID: <CACiQ9RGKzNXY+bpnGdXxvjUvvpnm+NipOiyxpOL2Ua-Wcv6sSw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
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:
https://github.com/kislyuk/argcomplete/issues/228#issuecomment-327696251
(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:
https://github.com/zsh-users/zsh/commit/23907bb840c80eef99eabba17e086e44c9b2d3fc#diff-b8d49b00032bcbfcdc709649f5d68505R11
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.
Thanks,
Evan.
next reply other threads:[~2017-11-17 9:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 9:19 Evan Underscore [this message]
2017-11-19 19:49 ` Peter Stephenson
2017-11-19 22:55 ` Evan Underscore
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=CACiQ9RGKzNXY+bpnGdXxvjUvvpnm+NipOiyxpOL2Ua-Wcv6sSw@mail.gmail.com \
--to=evanunderscore@gmail.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).