Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

oh-my-zsh not applying themes

I just set up zsh together with oh-my-zsh. But there's a bit of strange behavior that I cannot understand. If I restart Terminal (or iTerm 2––the behavior is the same in either) the theme specified in ~/.zshrc is not loaded. I need to do source ~/.zshrc for it to happen. If I echo $ZSH_THEME I get the theme I specified in ~/.zshrc. (And if I add echo "I'm loading it." to the bottom of ~/.zshrc, for example, I get the expected message upon opening a new window, etc.)

This question is very similar to mine. But none of the suggestions there appear relevant: the problem there was that some bits of ~/.zshrc were not being loaded, whereas in my case it seems they are being 'read' but not 'loaded' if that's a thing.

In case this is relevant: I do not have any files named .zprofile or .profile in my home directory.

Another bit of relevant information. If I change the value of ZSH_THEME in my .zshrc file, I need to source it twice in order to activate the new theme.

like image 386
apc Avatar asked Apr 13 '17 22:04

apc


People also ask

How do I enable plugins on zsh?

You add a folder with the custom plugin in your plugin directory and you are good to go. Oh-My-ZSH will by default be able to source your plugins from there as well, but it's really up to you. You can add your custom plugins to the general plugin directory or your custom plugin directory. It's only personal preference.


1 Answers

For Arch-linux users: I had to un-install the grml-zsh-config package and reboot: yay -Rncs grml-zsh-config

like image 147
James Lombard Avatar answered Sep 27 '22 17:09

James Lombard