Re: PATCH: Add \? to get PIPESTATUS information in the prompt
From:
Paul Jarc
Subject:
Re: PATCH: Add \? to get PIPESTATUS information in the prompt
Date:
Wed, 05 Sep 2001 13:55:35 -0400
User-agent:
Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7
I wrote:
> "Wesley J Landaker" <wjl@mindless.com> wrote:
>> This is possible to do, sure, with PROMPT_COMMAND and so forth, but
>> it's rather annoying, because running PROMPT_COMMAND actually modifies
>> PIPESTATUS, and so forth.
>
> You can save $? befare doing anything else, and restore it at the end.
Actually, PIPESTATUS is modified by PROMPT_COMMAND, but not by command
substitution in PS1 (in 2.04, anyway). $? is modified by both.
Weird. Chet, is this something we should rely on, or might it be
changed?
paul