summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorChristian Höltje <docwhat@gerf.org>2017-05-13 04:07:50 +0300
committerChristian Höltje <docwhat@gerf.org>2017-05-13 05:14:01 +0300
commite9e3e9dc538edc82bf8071919eca2fc9c56292a5 (patch)
treeeb5d743e1e0da2b43f487472b9b323156dfe5dad /powerlevel9k.zsh-theme
parent161c995625fc655eb3228a88f5ce1ad79fd1ede0 (diff)
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`
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 6 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index bcce12f4..cad455e6 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -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
}