News for hackers. Stuff that matters.
Re:Production is Red, Development is Blue by Toucan on Monday January 10, 2011 @03:43PM (#2089667)
You could put a shell script around cd that checks the current working directory every time you cd and alerts you appropriately.

A little clunky, I'll admit. I'd like to hear any more graceful solutions.

Re:Production is Red, Development is Blue by 1amzave on Monday January 10, 2011 @04:18PM (#2089787)
From man bash, the variable PROMPT_COMMAND:

  If set, the value is executed as a command prior to issuing each primary prompt.
e.g.:

  PROMPT_COMMAND='[[ "$PWD" =~ ^/sensitive/area ]] && PS1="be careful: " || PS1="normalprompt: "'