prompt_OFF command to deactivate any prompt

This commit is contained in:
nojhan 2012-08-11 10:20:37 +02:00
parent bfd9e5c708
commit 74109a5c83
2 changed files with 10 additions and 1 deletions

View File

@ -56,7 +56,9 @@ of pending commits, if any;
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.
one by typing `prompt_off`. Use `prompt_on` to bring it back. You can deactivate
any prompt and use a single mark sign (`$ ` for user and `# ` for root) with the
`prompt_OFF` command.
## INSTALL

View File

@ -815,6 +815,13 @@ prompt_off()
PROMPT_COMMAND=$LP_OLD_PROMPT_COMMAND
}
# Use an empty prompt: just the \$ mark
prompt_OFF()
{
PS1="\$ "
PROMPT_COMMAND=$LP_OLD_PROMPT_COMMAND
}
# By default, sourcing liquidprompt.bash will activate the liquid prompt
prompt_on