[Programs/Bash] do not overwrite PROMPT_COMMAND if it is already set

This commit is contained in:
Antoine Viallon 2024-04-04 15:32:39 +02:00
parent 8c2335f27c
commit 433565ff9c
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -16,9 +16,9 @@ with lib;
PS1="$(${pkgs.powerline-go}/bin/powerline-go -error $? -jobs $(jobs -p | wc -l))"
}
if [ "$TERM" != "dumb" ] && [ "$TERM" != "linux" ]; then
export PROMPT_COMMAND="_prompt"
export PROMPT_COMMAND="_prompt''${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
export -f _prompt
fi
export -f _prompt
'';
};
}