Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make displaying python version glyph in virtualenv segment configurable #346

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

w-biggs
Copy link

@w-biggs w-biggs commented Jun 20, 2023

Motivation: On my machine, python --version is taking 664ms to execute; this is then getting tacked onto every single shell command due to __bobthefish_prompt_virtualfish calling python --version to decide which version glyph to display. I'm not sure if python --version is simply not supposed to take that long, but I find it useful to have the current virtualenv displayed regardless, so making this configurable seems like the best route.

$theme_display_virtualenv_python_version is checked twice because I figured it was best to preserve the current behavior of "if the python version doesn't match any case, don't display the virtualenv color and glyph at all".

@bobthecow
Copy link
Member

So with this change it shows the glyph if you're in a virtualenv, but no version number?

For other similar things we change the binary yes/no to include an option like verbose. I'd be inclined to do that here, rather than introduce a new variable just to remove the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants