3

Can someone please help not sure I'm not able to change the theme in powerline , only see one theme => ZSH_THEME="agnoster" or ZSH_THEME="random" or ZSH_THEME="robbyrussell".

Not sure if it is caused by: oh-my-zsh.sh

source ~/.zshrc
bash: autoload: command not found
bash: /home/c.p/.oh-my-zsh/oh-my-zsh.sh: line 41: syntax error near unexpected token `('
bash: /home/c.p/.oh-my-zsh/oh-my-zsh.sh: line 41: `for plugin ($plugins); do'

I have the most oh-my-zsh.sh from :

  1. sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

  2. curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

still no luck ?

When running:

>>> source ~/.zshrc
source ~/.zshrc
bash: autoload: command not found
bash: /home/c.p/.oh-my-zsh/oh-my-zsh.sh: line 41: syntax error near unexpected token `('
bash: /home/c.p/.oh-my-zsh/oh-my-zsh.sh: line 41: `for plugin ($plugins); 
Alexandre B.
  • 5,387
  • 2
  • 17
  • 40
Raj
  • 31
  • 1
  • 3
  • Those errors suggest you're trying to execute a `zsh` specific script using `bash`. Of course it's not going to work. – Shawn Jul 29 '19 at 19:34
  • did you check the line 41 in `.oh-my-zsh/oh-my-zsh.sh` file. Seems like there is an unwanted single quote (') somewhere. – Prakhar Jul 29 '19 at 19:35
  • @shawn , where and how to run it ? -Prakhar code is all good just cloned from git repository. Problem is why not able to change the ZSH Theme ? – Raj Jul 30 '19 at 10:15
  • This helps [link](https://github.com/ohmyzsh/ohmyzsh/issues/8038#issuecomment-517334199) – fuat Oct 20 '20 at 08:52

3 Answers3

8

Follow these steps

$ zsh

$ chsh -s $(which zsh)

restart the system

Run the terminal

Abdul Basit
  • 953
  • 13
  • 14
0

I have encountered the following error while executing source file path command after making change in a file. I did the following. before:

qbecal@TC215-TOR-MAC projects % source  ~/.zshrc
-bash: autoload: command not found on mac source

After:

TC215-TOR-MAC:projects qbecal$ exec zsh
qbecal@TC215-TOR-MAC projects % source  ~/.zshrc
shahid
  • 1
  • 1
0

Run : source ~/.zshrc

It has fixed issue

Sanju Chandra
  • 51
  • 1
  • 1