mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 17:50:09 +00:00
parent
7234d52ebd
commit
37cbc9a02d
2 changed files with 20 additions and 1 deletions
|
@ -1740,7 +1740,7 @@ $(print_icon 'MULTILINE_LAST_PROMPT_PREFIX')'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$POWERLEVEL9K_DISABLE_RPROMPT" != true ]]; then
|
if [[ "$POWERLEVEL9K_DISABLE_RPROMPT" != true ]]; then
|
||||||
RPROMPT='$RPROMPT_PREFIX%f%b%k$(build_right_prompt)%{$reset_color%}$RPROMPT_SUFFIX'
|
RPROMPT="${RPROMPT_PREFIX}"'%f%b%k$(build_right_prompt)%{$reset_color%}'"${RPROMPT_SUFFIX}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local NEWLINE='
|
local NEWLINE='
|
||||||
|
|
|
@ -114,4 +114,23 @@ function testOverwritingIconsWork() {
|
||||||
# rm -fr ~/$testFolder
|
# rm -fr ~/$testFolder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testNewlineOnRpromptCanBeDisabled() {
|
||||||
|
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
|
||||||
|
POWERLEVEL9K_RPROMPT_ON_NEWLINE=false
|
||||||
|
POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||||
|
POWERLEVEL9K_CUSTOM_RWORLD='echo rworld'
|
||||||
|
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_world)
|
||||||
|
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_rworld)
|
||||||
|
|
||||||
|
powerlevel9k_prepare_prompts
|
||||||
|
assertEquals '$(print_icon MULTILINE_FIRST_PROMPT_PREFIX)[39m[0m[49m[47m [30mworld [49m[37m[39m $(print_icon MULTILINE_LAST_PROMPT_PREFIX)[1A[39m[0m[49m[37m[39m[47m[30m rworld [39m[00m[1B' "$(print -P ${PROMPT}${RPROMPT})"
|
||||||
|
|
||||||
|
unset POWERLEVEL9K_PROMPT_ON_NEWLINE
|
||||||
|
unset POWERLEVEL9K_RPROMPT_ON_NEWLINE
|
||||||
|
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||||
|
unset POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS
|
||||||
|
unset POWERLEVEL9K_CUSTOM_WORLD
|
||||||
|
unset POWERLEVEL9K_CUSTOM_RWORLD
|
||||||
|
}
|
||||||
|
|
||||||
source shunit2/source/2.1/src/shunit2
|
source shunit2/source/2.1/src/shunit2
|
||||||
|
|
Loading…
Reference in a new issue