0

Is there any way to have the live time in the promt, such that when I execute a command, the time shown is the time the command was executed?

So far I'm using S1="[\t me@here]\$ " for example, and this is the prompt: [04:30:39 me@here]$

If I run a few commands, I get this:

[04:30:39 me@here]$ date #command1
Tue Dec  3 04:30:47 EET 2019 #result1
[04:30:47 me@here]$ date #command2
Tue Dec  3 04:31:01 EET 2019 #result2
[04:31:01 me@here]$ date #command4
Tue Dec  3 04:31:04 EET 2019 #result4

As you can see, the time of command1's execution is on the prompt of command2.

I would like a timer that "ticks" with the prompt on idle, if it's possible.

| improve this question | | | | |
0

this will do that:

https://github.com/christopher-barry/bash-color-tools

run install, then run setup-prompt for each user. The prompt is theme-able, so you can set colors, have different stuff displayed, etc.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.