config-bash/libs/prompt_command.bash

10 lines
200 B
Bash
Raw Normal View History

2024-01-27 19:04:33 +01:00
#!/bin/bash
_prompt_command_add() {
if [ -n "$1" ] && [[ ":$PROMPT_COMMAND:" != *":$1:"* ]]; then
PROMPT_COMMAND="${PROMPT_COMMAND:+"$PROMPT_COMMAND:"}$1"
fi
}
export PROMPT_COMMAND