title: How do I dynamically add environment variables to zsh prompt?
body: <p>EDIT: Original title said "bash prompt", but I use "zsh". I accepted @Artur R. Czechowski's answer because it was correct in a bash context and I was able to make mine work with his help. PROMPT is now <code>'   ${ENV}${ENV:+ } %F{249}${PWD/#$HOME/~} %{$fg[green]%}'○'  '</code>, just adding the bit about ENV was all I needed.</p>
  
  <p>ORIGINAL POST: As part of my job, I change environment variables frequently. So frequently that I feel I'm going to inevitably going to forget which one I'm in and do something I shouldn't. In case it's relevant to you answering my question, I change environment by running a shell script and my current bash prompt is <code>PROMPT='   %F{249}${PWD/#$HOME/~} %{$fg[green]%}'○'  '</code>.</p>
  
  <p>If I'm in a virtual environment, such as venv, then my prompt gets prefaced with (.venv). How do I get something similar with an environment variable such as <code>DB_HOST</code> or whatever variable I want? If <code>DB_HOST</code> changes, I want the bash prompt to change right away and persist.</p>