Restore LP_ERR as the first instruction of _lp_set_prompt
This commit is contained in:
parent
cf8b8b29bb
commit
64c6b7c0f9
@ -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 ;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user