zap-zsh / zap

:zap: Zap is a minimal zsh plugin manager
https://www.zapzsh.com/
GNU General Public License v3.0
942 stars 33 forks source link

powerlevel10k runs configuration wizard on every shell startup #180

Closed mmorys closed 3 months ago

mmorys commented 3 months ago

Describe the bug

Every time I open a zsh shell, the Powerlevel10k configuration wizard runs.

I am unable to get Powerlevel10k to load an existing configuration from ~/.p10k.zsh

Steps to reproduce

  1. Create a ~/.zshrc file like so:
    [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
    plug "romkatv/powerlevel10k"
    autoload -Uz compinit
    compinit
  2. Open a new terminal window, or run exec zsh
  3. See "Description" above for what happens next

Expected behavior

powerlevel10k should use the existing configuration in ~/.p10k.zsh instead of running the Configuration Wizard every time a shell is opened.

Screenshots and recordings

No response

OS / Linux distribution

Ubuntu 20.04

Zsh version

5.8

Zap version

release-v1/1.2.1 on commit 2904b87

Terminal emulator

Gnome Terminal 3.36.2

If using WSL on Windows, which version of WSL

None

Additional context

No response

mmorys commented 3 months ago

Found the issue... It is not a zap issue.

I had previously been using zsh4humans, which had edited my ~/.zshenv file unbeknownst to me. Clearing out the ~/.zshrc file as I had done was not sufficient to reset things to a base state. This is documented in the uninstall directions of zsh4humans. Once I deleted the ~/.zshenv file as well, powerlevel10k worked as expected.