Open TheRandomTroll opened 5 years ago
Does the user
segment work?
POWERLEVEL9K_LEFT_PROMPT_SEGMENTS=( user ... )
I tried adding both user
and host
to the segment. It only shows the host name.
What does echo $USER
give you? What OS are you using?
$ echo $USER
therandomtroll
I am using Ubuntu 18.04.1 LTS.
P.S. I also added a DEFAULT_USER
to .zshrc
and set it to therandomtroll
. Still - no use.
Does print -P "%n"
give you therandomtroll
as well?
$ print -P "%n"
therandomtroll
It does.
Can you check the content of $POWERLEVEL9K_CONTEXT_TEMPLATE
and $POWERLEVEL9K_USER_TEMPLATE
please?
They echo %n@%m
and %n
respectively.
Then as far as I can tell the code is working correctly. Can you share your configuration file please?
I see the issue: If you set DEFAULT_USER
to your current username, the user isn't printed in the segment. This is so that the segment only prints when it is not you. If you want to see your user all the time, comment out or remove line 4 of your .zshrc
file.
Line 629 for context
and line 659 for user
in the powerlevel9k.zsh-theme
file
I did it. The issue remains.
Just to be sure: after removing/uncommenting the DEFAULT_USER, you tested this in a new shell? To see this effect instantly (without removing that line / shell reloading), you need to unset DEFAULT_USER
..
POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=true
always uses the POWERLEVEL9K_CONTEXT_TEMPLATE
, while POWERLEVEL9K_ALWAYS_SHOW_USER=true
always shows $(whoami)
if the first one is false.
Whenever I run my ZSH, my username does not appear. And, if I enable the context, it doesn't show anything. The host name is displayed properly, but not the username.
Here is a photo of my terminal at the moment:
I haven't tweaked any of the code, neither in .zshrc, nor in the .zsh-theme file.
Here is my environment information: