oh-my-git
oh-my-git copied to clipboard
Retain the old return code when executing the bash_prompt changes.
The 'bash_prompt' function was not preserving the return code between calls to it. If other PROMPT_COMMAND executions were to rely on the return code - say, to change the value of a variable that would be substituted into the PS1 value to indicate the return code - this would be broken, causing such functions to break.
This change preserves the return code such that the subsequent prompt command executions can take advantage of the value of the prior executed commands return.