Just got started with zsh yesterday but I'm having a lot of trouble getting themes to work. Here is what is showing on my ZSH prompt:
$fg[cyan][$fg[white] keithy $fg[cyan]] [$fg[white]~/Desktop$fg[cyan]] >$reset_color
My ~/.zshrc
source ~/.antigen.zsh
antigen theme jdavis/zsh-files themes/jdavis
Thanks
TL;DR: Corrected .zshrc is provided at the bottom. You might want to try it first, see it working, then come back to read the explanations.
Inspecting antigen.zsh and jdavis.zsh-theme, it looks like you have two problems:
You haven't loaded and executed the colors function anywhere. Add
autoload -U colors && colors
to your .zshrc.
PROMPT is single-quoted and not parsed. You need to use the PROMPT_SUBST option option to parse the prompt string. Add
setopt promptsubst
to your .zshrc. What the option does, according to the linked documentation:
If set, parameter expansion, command substitution and arithmetic expansion are performed in prompts. Substitutions within prompts do not affect the command status.
So your .zshrc should look like
source ~/.antigen.zsh
autoload -U colors && colors
setopt promptsubst
antigen theme jdavis/zsh-files themes/jdavis
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With