mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 00:10:08 +00:00
newline: support PROMPT_ON_NEWLINE
The newline segment will now show ├─ when using `POWERLEVEL9K_PROMPT_ON_NEWLINE` Note: This can be overridden via `POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX`
This commit is contained in:
@@ -339,14 +339,18 @@ prompt_background_jobs() {
|
||||
|
||||
# A newline in your prompt, so you can segments on multiple lines.
|
||||
prompt_newline() {
|
||||
local lws
|
||||
local lws newline
|
||||
[[ "$1" == "right" ]] && return
|
||||
newline=$'\n'
|
||||
lws=$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS
|
||||
if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then
|
||||
newline="${newline}$(print_icon 'MULTILINE_NEWLINE_PROMPT_PREFIX')"
|
||||
fi
|
||||
POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS=
|
||||
"$1_prompt_segment" \
|
||||
"$0" \
|
||||
"$2" \
|
||||
"NONE" "NONE" $'\n'
|
||||
"NONE" "NONE" "${newline}"
|
||||
POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS=$lws
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user