Can't configure p10k using oh my zsh : zsh: command not found: p10k
Asked Answered
E

6

26

I wanted to install the p10k theme in my terminal but I get an error.

➜  ~ p10k configure
zsh: command not found: p10k

I have no clue on what the issue is.
Thanks for your time :),
Hukyfi

Ellswerth answered 27/9, 2020 at 9:33 Comment(1)
Could try some solutions there github.com/romkatv/powerlevel10k/issues/557Lope
L
32

Install Powerlevel10k manually.

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc

This method of installation won't make anything slower or otherwise sub-par.

powerlevel10k manual

Lietman answered 10/1, 2021 at 1:2 Comment(0)
P
28

Most probably this step of cloning powerlevel10k is already done:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k

The problem is in the command mentioned in powerlevel10k README file. It should be

echo 'source ~/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
President answered 25/4, 2021 at 5:18 Comment(0)
D
11

I know it is a bit late (2 years I guess) but your problem is caused by fact you installed p10k going Oh My Zsh's way (from the doc's) but you forgot to do one simple thing.

To set:

ZSH_THEME="powerlevel10k/powerlevel10k"

in ~/.zshrc.

Domination answered 22/5, 2022 at 20:4 Comment(3)
Actually, my problem was an existing line ZSH_THEME="robbyrussell" several lines belowCoumarone
Thanks for comment. In my case, which was very similar to Hukify's, what I wrote helped. But your is kinda similar too. Thanks for sharing.Domination
Also note the ZSH_THEME needs to be set before source $ZSH/oh-my-zsh.sh in your .zshrcGuenther
J
6

Also typing (below) should show the prompt after you've made the edit in .rc file.

$ exec zsh
Jugate answered 31/10, 2022 at 15:42 Comment(1)
This is the answerRatha
S
2

In my case I did add ZSH_THEME="powerlevel10k/powerlevel10k" at the end of ~/.zshrc and it was producing the same error as for question author.

Make sure you add it before source $ZSH/oh-my-zsh.sh line in the ~/.zshrc

Strephon answered 30/1, 2024 at 14:59 Comment(0)
N
1

I had the same issue and already installed Powerlevel10k correctly. My problem was I had two ZSH_THEME variables with different values (a default ZSH_THEME="robbyrussell" and the new ZSH_THEME="powerlevel10k/powerlevel10k") in my .zshrc file. I deleted the ZSH_THEME="robbyrussell" line (then source .zshrc) and it worked.

Navar answered 12/4, 2023 at 23:0 Comment(1)
Nice, thanks for sharing with us. I'm certain it will help someone.Domination

© 2022 - 2025 — McMap. All rights reserved.