A little clunky, I'll admit. I'd like to hear any more graceful solutions.
If set, the value is executed as a command prior to issuing each primary prompt.
PROMPT_COMMAND='[[ "$PWD" =~ ^/sensitive/area ]] && PS1="be careful: " || PS1="normalprompt: "'
A little clunky, I'll admit. I'd like to hear any more graceful solutions.