Re: funsub in PS2

2024-03-28 Thread Chet Ramey
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='${ : ; }> ' $ printf '[%s]\n' ab\ > cd

funsub in PS2

2024-03-26 Thread Grisha Levit
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='${ : ; }> ' $ printf '[%s]\n' ab\ > cd [XXcd]