This might be a bit fringe, but I recently moved to zsh and am having a problem customizing my shell prompt.
Part of my .zshrc looks like this:
# kee
I ran into the same problem while customizing my prompt in zsh
.
I believe this happens because the shell interpolates the value into the string once, when the prompt is initialized. Subsequent reloads have the constant string in your prompt, not the subshell interpolation.
Instead, put any lines that involve subshells into a variable defined with single quotes. Then interpolate that variable instead.
autoload -U colors && colors
local parse_special='%{$fg[yellow]%}$(date)%{$reset_color%}'
PS1="%{$fg[green]%}%n@%m %{$fg[blue]%}%c ${parse_special} %# "
Update: Adding this from ZyX's answer to make a complete solution for this. You also need to add this:
setopt promptsubst
In fact, I would suggest extracting each part of your prompt into a variable like this, including a reset_color on each. Doing so lets you change the order of prompt components without changing their implementation.