bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash feature suggestion, show command RC codes in history


From: Chet Ramey
Subject: Re: bash feature suggestion, show command RC codes in history
Date: Wed, 3 May 2023 10:25:07 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1

On 4/23/23 1:56 PM, Mark Schlegel wrote:
Bash has a history function, it would be useful if 'history' would show the 
exit codes (return codes) from all commands:

Thanks for the proposal. There have been various suggestions over the years
about additional information attached to each history entry, including
$PWD, $?, etc., but there are issues with doing that. Where $? starts to get messy, for example, is with asynchronous commands -- how do you tie the
exit status of an arbitrary background job back to the right history entry?

--
``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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]