Re: [PATCH] spell-correct-word: avoid inf loop with neg arg

2024-05-22 Thread Chet Ramey
On 5/21/24 10:41 PM, Grisha Levit wrote: bash --norc -in <<< $'A \e-\cXs' I think I'd rather make negative counts work in the opposite direction. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CW

[PATCH] spell-correct-word: avoid inf loop with neg arg

2024-05-21 Thread Grisha Levit
bash --norc -in <<< $'A \e-\cXs' --- bashline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bashline.c b/bashline.c index 528f56e0..0a4e280e 100644 --- a/bashline.c +++ b/bashline.c @@ -1336,6 +1336,9 @@ bash_spell_correct_shellword (int count, int key) int wbeg, wend; char *text