Hacker News new | ask | show | jobs
by countermeasure 2250 days ago
I'm not sure how it would suit your workflow, but you could try out PROMPT_COMMAND.

https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash....

It's executed just before the PS1 prompt is printed.

A nice idea I've seen is to use PROMPT_COMMAND to print the time a command finished (and maybe an indication of its exit status) in low-contrast text at the far right of the terminal. Then that info is there if you want to look for it, but it's not distracting.

Then you could have the best of both worlds, and it would all happen without the need to remember to create fresh prompts.