do not overwrite PROMPT_COMMAND and set it back with prompt_off

This commit is contained in:
nojhan 2012-08-04 19:11:04 +02:00
parent bf46824121
commit c46f027b42

View File

@ -756,14 +756,15 @@ __set_bash_prompt()
prompt_on()
{
LP_OLD_PROMPT="$PS1"
PROMPT_COMMAND=__set_bash_prompt
LP_OLD_PROMPT_COMMAND="$PROMPT_COMMAND"
PROMPT_COMMAND="$PROMPT_COMMAND;__set_bash_prompt"
}
# Come back to the old prompt
prompt_off()
{
PS1=$LP_OLD_PROMPT
PROMPT_COMMAND=""
PROMPT_COMMAND=$LP_OLD_PROMPT_COMMAND
}
# By default, sourcing liquidprompt.bash will activate the liquid prompt