romkatv / powerlevel10k

A Zsh theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Oh My Zsh Theme Not Loading Properly on First Command

XYZliang opened this issue · comments

Hello Oh My Zsh Community,
I am experiencing an issue with Oh My Zsh where the theme and settings do not apply on the first command after opening a terminal or executing exec zsh on my Ubuntu 24 system. The proper theme and settings only seem to activate after the second command.

Environment:
Operating System: Ubuntu 24 (fresh installation, no prior custom configurations)
Oh My Zsh installation directory: /etc/oh-my-zsh (for system-wide access)
Configuration: Modified zshrc.zsh-template to /etc/zsh/zshrc, setting export ZSH=/etc/oh-my-zsh to apply common configurations like themes for all users.Use conda init zsh to write the relevant conda configuration into zshrc.
Theme: powerlevel10k/powerlevel10k

Behavior Observed:
The Oh My Zsh theme and settings do not load on the initial command post terminal launch or after exec zsh.
From the second command onward, the Oh My Zsh theme and configurations appear correctly.
image

Troubleshooting Steps:
No Oh My Zsh plugins or custom settings have been configured yet, to simplify the issue diagnosis.
I have attempted reinstallation of Oh My Zsh without any change in behavior.

Additional Debugging Attempt:
I exported a log of the loading phase by executing 'exec zsh -xvic'exit' &>~/zsh-debug.log', which may be helpful for troubleshooting.At the same time, I attach my /etc/zsh/zshrc file, even though it hasn't changed.
I am at a loss for what is causing this delayed loading and would greatly appreciate any insights or guidance on resolving this issue. Has anyone else faced something similar, or can anyone suggest further troubleshooting steps?
If anyone can help me, I will be extremely grateful.

zshrc.txt
zsh-debug.log

This is caused by prompt adam1, which you can find on line 20 of ~/.zshrc. This file has a bunch of other stuff that you probably don't want.

This is caused by prompt adam1, which you can find on line 20 of ~/.zshrc. This file has a bunch of other stuff that you probably don't want.

Thank you for your suggestion! The problem that troubled me all day has been solved, and I will read the document and check my ~/.zshrc again.