Warp icon indicating copy to clipboard operation
Warp copied to clipboard

p10k doesn't work at all

Open rv-nath opened this issue 1 year ago • 7 comments

Dupe Check

Describe the bug

After I run p10k configure and go through its prompts successfully, nothing changes !

To reproduce

  1. Run p10k configure
  2. Follow through the instructions and create a configuration.

Expected behavior

The prompt should look something similar to the screenshots attached in the screenshots section.

Screenshots

A properly working graphical prompt on a kde konsole terminal. image

Prompt in warp terminal image

Operating system

Linux

Operating system and version

Ubuntu 22.04.4 LTS

Shell Version

zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

Current Warp version

v0.2024.09.17.08.02.stable_01

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

I have seen other issues in this repository that mention p10k. I realize that at least other ppl were able to see something. In my case nothing works.

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

rv-nath avatar Sep 20 '24 16:09 rv-nath

This is immediately after running p10k configure. Configuration happens successfully and it creates the configuration file but doesn't display prompts.

image

rv-nath avatar Sep 20 '24 16:09 rv-nath

Just to confirm:

  • I have a few nerd fonts installed.
  • While configuring p10k I can see the prompt how it is going to come up.

image

rv-nath avatar Sep 20 '24 16:09 rv-nath

One important observation. From the warp terminal which is already a zsh, if I enter into a subshell by typing zsh then the p10k icons do show up.

image

rv-nath avatar Sep 20 '24 17:09 rv-nath

@rv-nath if you right click the prompt, hit "edit prompt", and then select "Shell Prompt", what do you see? image

alokedesai avatar Sep 20 '24 18:09 alokedesai

Hi Aloke, I see a string like hp% image

rv-nath avatar Sep 21 '24 03:09 rv-nath

Just to confirm: If you select "Save Changes" there, you still don't see p10 appear?

Are you using the same shell in both Warp and other terminals?

alokedesai avatar Sep 23 '24 13:09 alokedesai

Hey @rv-nath I'd also check your ~/.zshrc file and make sure it has the p10k source line.

## Powerlevel10k ; To customize prompt, run p10k configure or edit ~/.p10k.zsh
source ~/powerlevel10k/powerlevel10k.zsh-theme

Also, run echo $SHELL on warp to check which shell is being used, it should say the same as the result of which zsh, if not then you can set that up in your Settings > Features > Sessions > Startup shell for new sessions > Custom

dannyneira avatar Sep 25 '24 20:09 dannyneira

There may be something in your ZSH setup that is breaking this.

I use p10k on mac and Linux with Warp and have zero issues.

Can you make a backup of your .zshrc file, then start adding things back in one by one to see if there is anything there that causes the issue?

SilentGlasses avatar Apr 11 '25 14:04 SilentGlasses

Here's the basics of mine, if this helps:

# Enable Powerlevel10k instant prompt.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# Set Shell Theme
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ZSH_THEME="powerlevel10k/powerlevel10k"

# Better History
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
HISTFILE="$HOME/.zsh_history"
export HISTSIZE=1200000000
export SAVEHIST=1000000000
setopt APPEND_HISTORY		# Write to history
setopt HIST_EXPIRE_DUPS_FIRST	# Expire duplicate entries first when trimming history.
setopt HIST_FIND_NO_DUPS	# Do not display a line previously found.
setopt HIST_IGNORE_ALL_DUPS	# Delete old recorded entry if new entry is a duplicate.
setopt HIST_IGNORE_DUPS		# Don't record an entry that was just recorded again.
setopt HIST_IGNORE_SPACE	# Don't record an entry starting with a space.
setopt HIST_NO_STORE		# Don't store history commands
setopt HIST_REDUCE_BLANKS	# Remove superfluous blanks before recording entry.
setopt HIST_SAVE_NO_DUPS	# Older duplicates are omitted.
setopt HIST_VERIFY		# Don't execute immediately upon history expansion.
setopt INC_APPEND_HISTORY	# Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY		# Share history between all sessions.
SHELL_SESSION_HISTORY=0		# Disable per-terminal-session

# Pull p10k config
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

SilentGlasses avatar Apr 11 '25 14:04 SilentGlasses