You can temporarily deactivate the liquid prompt and come back to your previous one by typing . Use to bring it back.

This commit is contained in:
nojhan 2012-08-04 19:05:34 +02:00
parent ee45f66c36
commit bf46824121
2 changed files with 19 additions and 1 deletions

View File

@ -52,6 +52,9 @@ there is changes, in yellow if there is pending commits to push;
* the error code of the last command, if it has failed in some way;
* a smart mark: ± for VCS directories, $ for simple user, a red # for root.
You can temporarily deactivate the liquid prompt and come back to your previous
one by typing `prompt_off`. Use `prompt_on` to bring it back.
## INSTALL

View File

@ -752,6 +752,21 @@ __set_bash_prompt()
#PS1="\[\033[G\]${PS1}${NO_COL}"
}
PROMPT_COMMAND=__set_bash_prompt
# Activate the liquid prompt
prompt_on()
{
LP_OLD_PROMPT="$PS1"
PROMPT_COMMAND=__set_bash_prompt
}
# Come back to the old prompt
prompt_off()
{
PS1=$LP_OLD_PROMPT
PROMPT_COMMAND=""
}
# By default, sourcing liquidprompt.bash will activate the liquid prompt
prompt_on
# vim: set ts=4 sw=4 tw=120 :