Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bashcompinit incorrectly calculates COMP_LINE (proposed fix included)
- X-seq: zsh-workers 42027
- From: Evan Underscore <evanunderscore@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: bashcompinit incorrectly calculates COMP_LINE (proposed fix included)
- Date: Fri, 17 Nov 2017 20:19:25 +1100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=0nB2DukRW49VUniuO4+PWX4AEq8suTDa2/X4RYgbnHM=; b=phLPFESJhI0RGZYsOfboHhGjZZqO0pTn0/USxh1kF6swvY36tEYaleXXqwjRJc3tGu NW598YA2MUYbhlQvYP+JpM+FYgjYp/6ugpHLcawyBTEi2kjQ8zyUFX4NAp7hMHJm6Yig ah4A9FQUTnmtqUdZZNsSRNG+BWM3jhbRs6nudVN4EqtxnM5k+kKNEy+EmP3nzktbS1cc YomqUYYk7itpFvRzj6HZ8q6chbKH7gDBjrtL5+BEsShcqkLgM+IjE6x/Dl8tH4FQCMPv 5t6kLiyBqGS0WVNBfu6yzXp1fc9XUEWOm8xTf8OV4BqymiWKkxIBCE6u98OoHPc7fqKP ZnFA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: evan.andrews.au@xxxxxxxxx
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author