Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.47k stars 947 forks source link

pyenv block is not displayed #1104

Closed horseinthesky closed 5 years ago

horseinthesky commented 5 years ago

Hello. pyenv block is not displayed with this settings

POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(virtualenv pyenv vcs)

but it is displayed with this option

POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=true

But with this option, it also displays system when system python is enabled.

Environment Information

Ubuntu 18.04 LTS zsh 5.4.2 (x86_64-ubuntu-linux-gnu) oh-my-zsh p9k installed by cloning the repo p9k version is 2.1.7 (as far as I understand). I just did git pull emulators: SerureCRT, Putty, Kitty

dritter commented 5 years ago

Hi @horseinthesky . Thanks for the report. Just to get you right: You have a different pyenv activated than system and the pyenv segment still does not show up, right? Only if you set POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=true you see it, but you do not want to see the system env, right?

The segment has a shortcut: It shows the PYENV_VERSION if it is non-zero. Could you do an echo x${PYENV_VERSION}x? And could you post the output of pyenv version-name here?

horseinthesky commented 5 years ago

Yes. That's right.

echo x${PYENV_VERSION}x displays xx cuz PYENV_VERSION variable doesn't exist.

dritter commented 5 years ago

And what about pyenv version-name? Does it output anything? And what is the output of pyenv version-file-read $(pyenv root)/version?

horseinthesky commented 5 years ago

And what about pyenv version-name? Does it output anything? And what is the output of pyenv version-file-read $(pyenv root)/version?

3.7.1 in both cases when I am in env. And system in both cases when I am in the system.

horseinthesky commented 5 years ago

That's strange. I've just noticed that now it's working like it should: displaying python version when it differs from system version and not displaying system anymore. Not sure what I did wrong but it's ok now.

horseinthesky commented 5 years ago

Actually, env displays if there is .python-version is the directory. Otherwise, it is not displayed.