Re: Segfault when running alias if PROMPT_COMMAND is not empty
From:
Chet Ramey
Subject:
Re: Segfault when running alias if PROMPT_COMMAND is not empty
Date:
Sat, 19 Jul 2025 16:17:22 -0400
User-agent:
Mozilla Thunderbird
On 7/19/25 5:07 AM, Sam James wrote:
Thanks for the report. In the general case, evaluating the value of a shell
variable as a command should save and restore the parser state. In this
edge case, though, it's not necessary because PROMPT_COMMAND is only
evaluated before parsing a command. The attached patch should fix it.
This patch applied to 5.3 seems to break IGNOREEOF="1" for me:
OK, I guess I'll have to solve this in a less general way, since you do
need to restore some of the parser state. Thanks for the report.
--
``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/