oh-my-git icon indicating copy to clipboard operation
oh-my-git copied to clipboard

Retain the old return code when executing the bash_prompt changes.

Open gerph opened this issue 6 years ago • 0 comments

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.

gerph avatar Jun 19 '18 18:06 gerph