Use LP_MARK_PREFIX="\n" to seperate the prompt into two lines

This commit is contained in:
dryman 2013-05-13 21:21:42 -07:00 committed by Olivier Mengué
parent 8e2cc80a54
commit 4111ffc493
2 changed files with 3 additions and 1 deletions

View File

@ -284,6 +284,7 @@ Set to a null string "" if you do not want color.
* Prompt mark
* `LP_COLOR_MARK` as user
* `LP_COLOR_MARK_ROOT` as root
* `LP_MARK_PREFIX="\n"` put the prompt on the second line
* Current user
* `LP_COLOR_USER_LOGGED` user who logged in
* `LP_COLOR_USER_ALT` user but not the one who logged in

View File

@ -278,6 +278,7 @@ _lp_source_config()
LP_MARK_BRACKET_OPEN=${LP_MARK_BRACKET_OPEN:-"["}
LP_MARK_BRACKET_CLOSE=${LP_MARK_BRACKET_CLOSE:-"]"}
LP_MARK_SHORTEN_PATH=${LP_MARK_SHORTEN_PATH:-" … "}
LP_MARK_PREFIX=${LP_MARK_PREFIX:-""}
LP_COLOR_PATH=${LP_COLOR_PATH:-$BOLD}
LP_COLOR_PATH_ROOT=${LP_COLOR_PATH_ROOT:-$BOLD_YELLOW}
@ -1709,7 +1710,7 @@ _lp_set_prompt()
PS1="${PS1}${LP_VCS}"
# add return code and prompt mark
PS1="${PS1}${LP_RUNTIME}${LP_ERR}${LP_MARK}${LP_PS1_POSTFIX}"
PS1="${PS1}${LP_RUNTIME}${LP_ERR}${LP_MARK_PREFIX}${LP_MARK}${LP_PS1_POSTFIX}"
# "invisible" parts
# Get the current prompt on the fly and make it a title