Frage

I wanna custom my zsh theme ,but i don't known what does the %F and %K mean

such like

RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%F{240}"$'\ue0b2'"%f%k%K{240}%F{255} $POWERLINE_RIGHT_A %f%k"

And i don't understand what is the %f%k 。。

Do you have any documentiions about how to custom oh my zsh theme ?

War es hilfreich?

Lösung

The ZSH documentation is very good. Learn to use the man pages: specifically, man zshmisc. You want the section on SIMPLE PROMPT ESCAPES:

%F (%f)
Start (stop) using a different foreground colour, if supported by the terminal. The colour may be specified two ways: either as a numeric argument, as normal, or by a sequence in braces following the %F, for example %F{red}. In the latter case the values allowed are as described for the fg zle_highlight attribute; see Character Highlighting in zshzle(1). This means that numeric colours are allowed in the second format also.

%K (%k)
Start (stop) using a different bacKground colour. The syntax is identical to that for %F and %f.

You've asked:

Do you have any documentation about how to custom oh my zsh theme ?

There are lots of example themes bundled with oh-my-zsh. Look in the themes directory. Look at the forks on github. Read related zsh questions, or this one, or this one.

For my prompt, I borrowed a lot from this.

And, as always, read the man pages, or the zsh users guide.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top