We need to get the return code _before_ executing the old prompt in
order to not loose the returned value.
This commit is contained in:
Ludovic Rousseau 2012-08-05 11:19:19 +02:00
parent a6621a1f32
commit 5aaca781a2

View File

@ -708,12 +708,12 @@ __sb()
__set_bash_prompt() __set_bash_prompt()
{ {
# execute the old prompt
$LP_OLD_PROMPT_COMMAND
# as this get the last returned code, it should be called first # as this get the last returned code, it should be called first
__RET=$(__sl "$(__return_value $?)") __RET=$(__sl "$(__return_value $?)")
# execute the old prompt
$LP_OLD_PROMPT_COMMAND
# left of main prompt: space at right # left of main prompt: space at right
__JOBS=$(__sr "$(__jobcount_color)") __JOBS=$(__sr "$(__jobcount_color)")
__LOAD=$(__sr "$(__load_color)") __LOAD=$(__sr "$(__load_color)")