Terminal started behaving badly when Zshell theme is present

Originally from here.

Versions:

Steps to Reproduce:

  1. Install debian-dev-boilerplate inside WSL.

  2. Setup powerlevel 10k.

  3. Clone a git repo and enter its folder.

    git clone [email protected]:DanielAtKrypton/debian-dev-boilerplate.git

    cd debian-dev-boilerplate

You should now see something like:

Imgur

  1. Open vscode from zshell. By typing at the zshell prompt:

    code .

At this point the bug is revealed when the terminal is opened for the first time inside vscode. At first glance, the terminal renders correctly the powerlevel10k theme. After half a second, the theme is deactivated as can be seen in the next picture.

Imgur

Does this issue occur when all extensions are disabled?:

Yes. The first time vscode is launched, it installs a vanilla (with no extensions) vscode-server to the linux distro. And still the bug happens.

It is interesting to note that in prior vscode versions this functionality was working alright. For any reason I don't know this issue started to happen in the last couple weeks.

Additional Info:

Here is the log file when running the commands:

code . --log trace

exthost.log

Upvotes: 2

Views: 804

Answers (1)

Roman Perepelitsa
Roman Perepelitsa

Reputation: 2708

Most likely Powerlevel10k has been installed and/or loaded from ~/.zshrc incorrectly. The screenshot of VS Code shows robbyrussell theme, so I surmise that you are using Oh My Zsh. To install Powerlevel10k on top of Oh My Zsh you need to follow these instructions:

  1. Run: git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
  2. Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.

Try running grep -E 'ZSH_THEME|/powerlevel10k' ~/.zshrc. The output must be exactly like below.

ZSH_THEME="powerlevel10k/powerlevel10k"

If it's not, you need to fix ~/.zshrc.

Upvotes: 2

Related Questions