Re: [PATCH] shell-forward-word error with quoted comsub
From:
Chet Ramey
Subject:
Re: [PATCH] shell-forward-word error with quoted comsub
Date:
Fri, 17 Oct 2025 15:25:42 -0400
User-agent:
Mozilla Thunderbird
On 10/14/25 11:00 PM, Grisha Levit wrote:
Calling shell-forward-word in front of an incomplete quoted command
substitution causes a parser error to be printed, which is followed
by an incomplete redisplay:
$ "$(" ^A\e^F
bash: command substitution: line 2: unexpected EOF while looking
for matching `"'
even when the word is single-quoted:
$ '$(' ^A\e^F
bash: command substitution: line 3: unexpected EOF while looking
for matching `''
There might be a more general fix but this patch seems to work.
Thanks for the report. I do have a more general fix in mind, but we'll
start with this case.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/