Extend prompt command instead of replacing it

This commit is contained in:
2026-09-21 10:40:55 +02:00
parent 931795fdc2
commit 6c17db1aaf
+10 -1
View File
@@ -57,4 +57,13 @@ __prompt_build() {
PS1+=' \$ ' PS1+=' \$ '
} }
PROMPT_COMMAND=__prompt_build case ";${PROMPT_COMMAND-};" in
*";__prompt_build;"*) ;;
*)
if [[ -n ${PROMPT_COMMAND-} ]]; then
PROMPT_COMMAND="${PROMPT_COMMAND}; __prompt_build"
else
PROMPT_COMMAND=__prompt_build
fi
;;
esac