bugfix: avoid recurisve prompt command
The bug was occuring when sourcing the liquidprompt a second time while it has already been set. A set variable is now set to avoid double sourcing.
This commit is contained in:
parent
5da885a4ab
commit
fb814125af
@ -768,9 +768,16 @@ __set_bash_prompt()
|
|||||||
# Activate the liquid prompt
|
# Activate the liquid prompt
|
||||||
prompt_on()
|
prompt_on()
|
||||||
{
|
{
|
||||||
LP_OLD_PS1="$PS1"
|
# if liquidprompt has not been already set
|
||||||
LP_OLD_PROMPT_COMMAND="$PROMPT_COMMAND"
|
if [[ -z "$LP_LIQUIDPROMPT" ]] ; then
|
||||||
|
LP_OLD_PS1="$PS1"
|
||||||
|
LP_OLD_PROMPT_COMMAND="$PROMPT_COMMAND"
|
||||||
|
fi
|
||||||
PROMPT_COMMAND=__set_bash_prompt
|
PROMPT_COMMAND=__set_bash_prompt
|
||||||
|
|
||||||
|
# Keep in mind that LP has been sourced
|
||||||
|
# (to avoid recursive prompt command).
|
||||||
|
LP_LIQUIDPROMPT=1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Come back to the old prompt
|
# Come back to the old prompt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user