I’ve been tempted to add time logging by something similar to PS1=“$(date)\r$PS1” Because I don’t really care about the execution time of current commands but might care historically.
I’ve been tempted to add time logging by something similar to PS1=“$(date)\r$PS1” Because I don’t really care about the execution time of current commands but might care historically.
The thing is that the prompt might sit there for minutes or hours before you use it to run a command, so that timestamp doesn't reliably serve as an accurate record of when a command was run.
That's the problem which my approach addresses by updating the timestamp when a command is run.
If I did, It’s also possible to get amount of time a command required to complete. Based on that execution time in conjunction with the timestamp of the next print of PS1 it would be easy to deduce the time when a line was actually executed, rather than when typing of the line began, but at that point I’d probably just record my screen to track any harder to determine behaviours.