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    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to