Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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: "'


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: