bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: return from trap while reading with readline breaks completion


From: Chet Ramey
Subject: Re: return from trap while reading with readline breaks completion
Date: Sat, 10 Aug 2024 15:57:18 -0400
User-agent: Mozilla Thunderbird

On 8/6/24 4:19 AM, Oğuz wrote:
See:

$ ls
foo  s
$ cat s
trap return INT
read -e
$ source s

I press Ctrl-C here and bash prompts me for the next command. Then I
press F and Tab; instead of producing the bell sound bash completes f
to foo. If I press Ctrl-C again it prints "bash: return: can only
`return' from a function or sourced script" and completion returns to
normal.

Thanks for the report. The unwind-protect to restore the completion
function wasn't being installed in the right place.

Chet

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]