Closed keenonkites closed 3 years ago
I never noticed this because my prompt (PS1) is set to "[\033[36m]\u[\033[m]@[\033[32m]\h:[\033[33;1m]\w[\033[m]\$ " which sets the colour every time. The solution is to reset the colour with printf "\033[0m"
. Thank you for pointing it out.
Thanks for the fix. Confirmed, works now. Definitely nicer than my hack.
Nice little script. Good for 'timetracking' in the HomeOffice. Thanks.
Have a small issue: when the script finishes, the output color for further commands in this terminal window stays on green instead of reseting back to original color. Adding 'tput sgr0' as the very last line in the script solved the issue for me. This resets the text format to the terminals default.
I'm quite sure there is a nicer way to do this (reseting only text color, for example) but it works for me.
Cheers