oh-my-zsh plugins not working

牧云@^-^@ 提交于 2019-12-05 00:44:08

I got bit by this.

What happened is you did a manual install and the instructions for the manual install don't mention that you need to set the PATH yourself.

So you end up with the default PATH. The source for the automatic setup code copies your current path and appends it to the .zshrc, which isn't enough if you depend on non-standard PATH entries (e.g. you run Homebrew on a Mac).

So the fix is simple:

Fire up your old shell and it's configuration file and then copy and paste the value of $PATH into the top of your ~/.zshrc file.

Ciao!

Make sure that you define your plugins variable before you initialize zsh:

plugins=(git wd)
export ZSH=/home/<user>/.oh-my-zsh
source $ZSH/oh-my-zsh.sh

I had the same problem just now! There was a package called grml-zsh-config installed in my Archlinux. I removed this package and oh-my-zsh themes started to work.

I was running into this with the kubectl plugin.

Looking at the contents of ~/.oh-my-zsh/plugins/kubectl/kubectl.plugin.zsh I realized I didn't have the same content as what was on the github repo. Manually updating the file with the contents from the oh-my-zsh repo helped and the plugin started to work. Guess I had to update my oh-my-zsh installation to get the latest plugin content but this worked for me.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!