Re: [PATCH] fix cmd and hist nums in ${var@P} inside $PS[012]

2024-03-28 Thread Chet Ramey
On 3/26/24 9:02 AM, Grisha Levit wrote: When \# or \! is decoded in a ${var@P} expansion embedded in a prompt string, the value can be off by one from that of the same sequence embedded directly in the prompt string. Thanks for the report and patch. Chet -- ``The lyf so short, the craft so lo

[PATCH] fix cmd and hist nums in ${var@P} inside $PS[012]

2024-03-26 Thread Grisha Levit
When \# or \! is decoded in a ${var@P} expansion embedded in a prompt string, the value can be off by one from that of the same sequence embedded directly in the prompt string. $ H='\!' $ PS1='(\!:${H@P}) $' (3:2 501:500) $ * parse.y - decode_prompt_string: accept new int flag to sign