how to assing variable to PROMPT_COMMAND

by Andrew   Last Updated April 30, 2018 13:02 PM

How can i incremenet variable assigning it value to PROMPT_COMMAND variable?

inside .bashrc i created variable "a" and assigned value to 0 and then added this

a=0
PROMPT_COMMAND=`((a++))`

And when i echo PROMPT_COMMAND it shows that it is empty.

Tags : bash prompt


Related Questions


\w is not abbreviating $HOME as ~

Updated October 01, 2017 01:02 AM



New user, broken bash prompt parsing?

Updated September 01, 2018 16:02 PM

trim the terminal command prompt working directory

Updated February 19, 2017 00:02 AM