Hi everyone. Im using laptop with FreeBSD. What Im trying to do is to display the remaining capacity and time in the shell prompt.
It is easily achieved with bash, but in zsh, the command is only executed upon startup.
This is a bash prompt in the .bashrc file. I use the date command as an example. The current time will be updated everytime you exec new command:
Code:
PS1='`date +'%H:%M:%S'` \!\[\e[1;31m\][\[$?]\[\e[37m\]\u@\h:\w\\$ '
This method doesnt work with zsh. If I put a similar command in .zshrc, it will show the current time on startup only, after that, the time is not updated at all.