rainbow-zsh-prompt makes your zsh prompt rainbow by using dosentmatter/lolcat.
If you are looking for a rainbow prompt for bash, check out dosentmatter/rainbow-bash-prompt
rainbow-zsh-prompt is a zsh port of dosentmatter/rainbow-bash-prompt.
This demo is from rainbow-bash-prompt, but they function pretty much the same.
Tested on macOS Sierra (Terminal and iTerm2)
- Install C implementation of dosentmatter/lolcat for speed.
- That is a fork of jaseg/lolcat with a minor change to make the colors pseudo random.
- Put the binary in your
$PATH
and name itlolcat-c
- copy
.zsh_prompt
to your$HOME
directory - Add this to your
.zshrc
:
if [[ -f ~/.zsh_prompt ]]; then
. ~/.zsh_prompt
fi
- You can turn on and off debugging by setting
PS1_DEBUG
to'true'
or'false'
. Debugging is used to show the non-printing characters and highlight them. - You can change the command used to colorize
PS1
by settingPS1_COLORIZE_COMMAND
to a name of a function.- Currently, it is set to
'__ps1_lolcat'
which useslolcat-c
for speed.
- Currently, it is set to
- You can change the command used to format the debug output by setting
PS1_DEBUG_COMMAND
to a name of a function.- Currently, it is set to
__ps1_debug
which displays non-printing characters and colors them.
- Currently, it is set to