I want my bash prompt to change depending on external conditions.
Here is excerpt from the bash manual:
PROMPT_COMMAND: If set, the value is executed as a command prior to issuing each primary prompt. PS1: The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string.
.bash_profile I have following:
export PROMPT_COMMAND="echo -n ┏━━━[$(date +%H:%M)]" export PS1="━━[\t]━━━┓\n\$ "
Here is what I see in terminal:
┏━━━[03:46]━━[03:46:52]━━━┓ $ cd .. ┏━━━[03:46]━━[03:51:37]━━━┓ $
As you can see, PROMPT_COMMAND doesn't get executed more than once, and remains static forever.
How can I have it executed "prior to issuing each prompt", as stated in the manual?
I'm running Mac OS X 10.9.3