romkatv / powerlevel10k

A Zsh theme
MIT License
46.69k stars 2.2k forks source link

parse error near `}' #2739

Closed Lyton505 closed 3 months ago

Lyton505 commented 3 months ago

I got the following error /home/lyton/.oh-my-zsh/oh-my-zsh.sh:27: after executing source ~/.zshrc. I removed my zsh config(.zshrc) and uninstalled zsh, then reinstalled it. I ran source ~/.zshrc and didn't get any errors. After installing powerlevel10k using the instructions at this doc I started getting the same error.

Some relevent files:

  1. .zshrc

    export ZSH="$HOME/.oh-my-zsh"
    ZSH_THEME="robbyrussell"
    plugins=(git)
    source $ZSH/oh-my-zsh.sh
  2. zsh -f then git clone --depth=1 https://github.com/romkatv/powerlevel10k.git /tmp/powerlevel10k and lastly source /tmp/powerlevel10k/powerlevel10k.zsh-theme this doesn't give an error, except the message that Powerlevel10k configuration file (~/.p10k.zsh) was not sourced which is probably because of it not being sourced in .zshrc

romkatv commented 3 months ago

The .zshrc you've posted does not use powerlevel10k.

Also see https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#weird-things-happen-after-typing-source-zshrc

Lyton505 commented 3 months ago

Yes, that is correct, and even more intriguing to me because even without using the theme I still get the parsing error. The source command was working fine before installing the theme, and now raises the error after installing the theme. What you linked to makes sense. Nonetheless, thank you for the theme, it's my favorite. Just thought I'd let you know and you seem aware already so I'm closing this issue.