1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 05:40:07 +00:00

Multiline-Icons should be treated as icons as well.

This commit is contained in:
Dominik Ritter 2015-08-04 18:56:00 +02:00
parent 5777b7bb54
commit b1dba08c93

View file

@ -68,6 +68,8 @@ case $POWERLEVEL9K_MODE in
OK_ICON "\U2713" # ✓ OK_ICON "\U2713" # ✓
FAIL_ICON "\U2718" # ✘ FAIL_ICON "\U2718" # ✘
SYMFONY_ICON "SF" SYMFONY_ICON "SF"
MULTILINE_FIRST_PROMPT_PREFIX "╭─"
MULTILINE_SECOND_PROMPT_PREFIX "╰─ "
APPLE_ICON $'\UF8FF' #  APPLE_ICON $'\UF8FF' # 
FREEBSD_ICON $'\U1F608 ' # 😈 FREEBSD_ICON $'\U1F608 ' # 😈
LINUX_ICON $'\U1F427 ' # 🐧 LINUX_ICON $'\U1F427 ' # 🐧
@ -105,6 +107,8 @@ case $POWERLEVEL9K_MODE in
OK_ICON "\U2713" # ✓ OK_ICON "\U2713" # ✓
FAIL_ICON "\U2718" # ✘ FAIL_ICON "\U2718" # ✘
SYMFONY_ICON "SF" SYMFONY_ICON "SF"
MULTILINE_FIRST_PROMPT_PREFIX "╭─"
MULTILINE_SECOND_PROMPT_PREFIX "╰─ "
APPLE_ICON 'OSX' APPLE_ICON 'OSX'
FREEBSD_ICON 'BSD' FREEBSD_ICON 'BSD'
LINUX_ICON 'Lx' LINUX_ICON 'Lx'
@ -140,7 +144,7 @@ case $POWERLEVEL9K_MODE in
esac esac
if [[ "$POWERLEVEL9K_HIDE_BRANCH_ICON" == true ]]; then if [[ "$POWERLEVEL9K_HIDE_BRANCH_ICON" == true ]]; then
$icons['VCS_BRANCH_ICON']='' icons[VCS_BRANCH_ICON]=''
fi fi
function print_icon() { function print_icon() {
@ -643,11 +647,8 @@ powerlevel9k_init() {
add-zsh-hook precmd vcs_info add-zsh-hook precmd vcs_info
if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then
[[ -n $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX ]] || POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="╭─" PROMPT="$(print_icon 'MULTILINE_FIRST_PROMPT_PREFIX')%{%f%b%k%}"'$(build_left_prompt)'"
[[ -n $POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX ]] || POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="╰─ " $(print_icon 'MULTILINE_SECOND_PROMPT_PREFIX')"
PROMPT="$POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX%{%f%b%k%}"'$(build_left_prompt)'"
$POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX"
# The right prompt should be on the same line as the first line of the left # The right prompt should be on the same line as the first line of the left
# prompt. To do so, there is just a quite ugly workaround: Before zsh draws # prompt. To do so, there is just a quite ugly workaround: Before zsh draws
# the RPROMPT, we advise it, to go one line up. At the end of RPROMPT, we # the RPROMPT, we advise it, to go one line up. At the end of RPROMPT, we