Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

shopt command not found in .bashrc after shell updation

Tags:

bash

sh

zshrc

shopt

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

like image 618
Amerrnath Avatar asked Oct 28 '14 18:10

Amerrnath


People also ask

What is Shopt in Bashrc?

The “shopt” command provides control over many settings that are used to tweak the operations in a Bash shell.

What is Shopt in Shell?

On Unix-like operating systems, shopt is a builtin command of the Bash shell that enables or disables options for the current shell session.

How do I run a .bashrc file?

bashrc File from the beginning, you can do so by pressing Ctrl+Alt+T or opening a new terminal tab, making it all more accessible. At each launch, Bash runs the contents of the . bashrc file to load your preferences. You can find this shell script in the home directory of users.


1 Answers

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

like image 158
sudoz Avatar answered Sep 21 '22 01:09

sudoz