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

virtualenv unset variable virtualenv_path #1211

Closed buzzsurfr closed 5 years ago

buzzsurfr commented 5 years ago

Describe Your Issue

NOTE: This is for the next branch. This is working in the master branch.

The virtualenv segment does not properly display when activating a virtualenv.

Have you tried to debug or fix it?

I traced the error to this line: https://github.com/bhilburn/powerlevel9k/blob/61b665f0e4404e9525c73bff3aae516ae2d9f624/segments/virtualenv/virtualenv.p9k#L32

$virtualenv_path does not exist, but this can be changed to ${VIRTUAL_ENV:t} (same as the prepare_segment on line 34: https://github.com/bhilburn/powerlevel9k/blob/61b665f0e4404e9525c73bff3aae516ae2d9f624/segments/virtualenv/virtualenv.p9k#L34

I'm submitting a PR, but can close if unneeded for some reason.

Environment Information

This information will help us understand your configuration.

dritter commented 5 years ago

Just realized that this issue was still open, but the PR was already merged. -> closing.

Thanks @buzzsurfr again ;)