bug-bash
[Top][All Lists]
Advanced

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

bash feature suggestion, show command RC codes in history


From: Mark Schlegel
Subject: bash feature suggestion, show command RC codes in history
Date: Sun, 23 Apr 2023 13:56:09 -0400
User-agent: Cyrus-JMAP/3.9.0-alpha0-372-g43825cb665-fm-20230411.003-g43825cb6

Bash has a history function, it would be useful if 'history' would show the 
exit codes (return codes) from all commands:

For example, showing the RC  values in a new column after the history number

4751 0 2023-04-10 04:49:48 cat kernel-vanilla.repo
4752 0 2023-04-10 04:50:30 rm kernel-vanilla.repo 
4753 2 2023-04-10 04:50:53 grep baseurl kernel-vanilla.repo
4754 2  2023-04-10 04:50:55 ls -l kernel-vanilla.repo

showing non-zero RC codes due to the missing file in the last two. If adding a 
new column is disruptive (non-standard) this RC column could be optional just 
like the HISTTIMEFORMAT activates the HISTTIME

Mark


reply via email to

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