shopt command not found in .bashrc after shell updation

To place anything in ~/.bashrc:

Switch to bash:

exec bash

Then

source ~/.bashrc

Switching to bash will not effect on new terminal window. But if you want to switch current window to zsh.

Switch to zsh:

exec zsh

reference


shopt is not a command, but a shell built-in. bash knows what to do with it because it's a bash built-in , but zsh has no idea what it is. You'll want to look into setopt which is a zsh built-in, and put those values into a new .zshrc script.


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

Tags:

Bash

Sh

Zshrc

Shopt