Restore LP_ERR as the first instruction of _lp_set_prompt

This commit is contained in:
Olivier Mengué 2013-05-14 09:08:54 +02:00
parent cf8b8b29bb
commit 64c6b7c0f9

View File

@ -1381,14 +1381,14 @@ _lp_time()
_lp_set_prompt() _lp_set_prompt()
{ {
# as this get the last returned code, it should be called first
LP_ERR="$(_lp_sl $(_lp_return_value $?))"
# Reset IFS to its default value to avoid strange behaviors # Reset IFS to its default value to avoid strange behaviors
# (in case the user is playing with the value at the prompt) # (in case the user is playing with the value at the prompt)
local IFS="$(echo -e ' \t') local IFS="$(echo -e ' \t')
" # space, tab, LF " # space, tab, LF
# as this get the last returned code, it should be called first
LP_ERR="$(_lp_sl $(_lp_return_value $?))"
# execute the old prompt if not on Mac OS X (Mountain) Lion # execute the old prompt if not on Mac OS X (Mountain) Lion
case "$LP_OS" in case "$LP_OS" in
Linux|FreeBSD|SunOS) $LP_OLD_PROMPT_COMMAND ;; Linux|FreeBSD|SunOS) $LP_OLD_PROMPT_COMMAND ;;