bug-bash
[Top][All Lists]
Advanced

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

Re: funsub in PS2


From: Chet Ramey
Subject: Re: funsub in PS2
Date: Thu, 28 Mar 2024 12:13:45 -0400
User-agent: Mozilla Thunderbird

On 3/26/24 9:49 AM, Grisha Levit wrote:
Having funsubs in PS2 seems to cause input tokens that are split across
lines to be partially replaced with the last token of the last funsub
to be parsed while expanding the prompt string.

     $ PS2='${ : XXXX; }> '
     $ printf '[%s]\n' ab\
     > cd
     [XXcd]

Thanks for the report. This was a surprisingly involved fix, just to save
and restore the parser state.

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]