3 ms·
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='[[ "$P
by 1amzave 16y ago
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: "'