I contributed a patch to add bash's PS0 variable; this was done in C and nroff. It allows things like (Note the "below cmd output" part): ...with the following in one's ~/.bashrc or similar: Note that I recommend source'ing your ~/.bashrc from your ~/.bash_profile .

The idea behind $PS0 is to make post mortems nicer, because you have not just the finish time of commands, but also the start time. I use it in tandem with hcm (and indirectly pypty) to get tty/pty logs with good time data.

Prior to $PS0, you could use trap DEBUG.

The $PS0 patch is included in bash 4.4; it was released 2016-09-15.

Here's a page about operating system support of $PS0.


Hits: 16812
Timestamp: 2024-11-21 01:35:17 PST

Back to Dan's tech tidbits

You can e-mail the author with questions or comments: