shopt command not found in .bashrc after shell updation

Amerrnath picture Amerrnath · Oct 28, 2014 · Viewed 76.9k times · Source

I have updated my shell to ZSH . When i source ~/.bashrc . I am getting this error

There was some error in yo doctor . when i execute this command

echo "export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules" >> ~/.bashrc && source ~/.bashrc

/home/amerrnath/.bashrc:17: command not found: shopt /home/amerrnath/.bashrc:25: command not found: shopt /home/amerrnath/.bashrc:109: command not found: shopt /usr/share/bash-completion/bash_completion:35: parse error near]]'

Please help me resolve this problem

Answer

sudoz picture sudoz · Sep 7, 2015

zsh uses env profile ~/.zshrc, not ~/.bashrc.

so you need to append your env settings to .zshrc file and then

source ~/.zshrc

It must work.

rbenv github link