oh-my-zsh config file not loading

泄露秘密 提交于 2019-12-01 02:16:10

I figured this out. It was due to my config file. The part of the zsh config that wasn't loading needed to be moved down after the plugins load. After moving that it all worked as expected.

If you have themes like Powerlevel9k installed for your zsh shell then source the oh-my-zsh config file after the theme variable assignments in your .zshrc file like shown below.

Eg:

........
........
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=('status' 'load' 'ram_joined' 'time')

# source oh-my-zsh config
source $ZSH/oh-my-zsh.sh

My final solution was to go to Terminal --> Preferences --> General --> Shells open with --> Command (complete path), and set it to /bin/zsh (or your path to zsh), and then set both New windows/tabs open with to "Same profile". It works fine for me.

My initial attempt was to go to Terminal --> Preferences --> Profiles, and in my default profile's "shell" tab's Startup section, I set it to run command "source ~/.zshrc". This also solved the problem of /.zshrc not loading, but it seemed tedious to see that command show on every terminal tab/window.

I had a similar problem. I found that I had long ago changed my Terminal preferences to run tcsh instead of the default login shell. Took me forever to figure this out!

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