Skip to content

fix: support VIRTUAL_ENV_PROMPT alongside VIRTUAL_ENV#405

Merged
edouard-lopez merged 2 commits intopure-fish:masterfrom
gouline:virtual-env-prompt
Feb 13, 2026
Merged

fix: support VIRTUAL_ENV_PROMPT alongside VIRTUAL_ENV#405
edouard-lopez merged 2 commits intopure-fish:masterfrom
gouline:virtual-env-prompt

Conversation

@gouline
Copy link
Contributor

@gouline gouline commented Feb 9, 2026

related: extends #195

In addition to the already implemented VIRTUAL_ENV variable, many Python virtual env tools also set VIRTUAL_ENV_PROMPT (e.g. virtualenv). Unlike VIRTUAL_ENV, which is the absolute path to the virtual env directory (e.g. /home/user/project/.venv), VIRTUAL_ENV_PROMPT is just the name of the virtual env project.

This pull request implements displaying VIRTUAL_ENV_PROMPT when it's set and defaulting to existing VIRTUAL_ENV or CONDA_DEFAULT_ENV base names otherwise.

Thanks for maintaining this project!

How to test pre-release?

☠️ Feature can be unstable and break your prompt!

fisher install gouline/pure@virtual-env-prompt

Specs

Documentation

When VIRTUAL_ENV_PROMPT and VIRTUAL_ENV are both set, VIRTUAL_ENV_PROMPT value is displayed. Otherwise, the order of precedence is VIRTUAL_ENV then CONDA_DEFAULT_ENV.

Acceptance Checks

  • Documentation is up-to-date:
  • Tests are passing (we can help you 🤗 ):
  • Feature is implemented.

Copy link
Member

@edouard-lopez edouard-lopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank!
Just a tiny change on the doc and we are good

Co-authored-by: Édouard Lopez <edouard-lopez@users.noreply.github.com>
@edouard-lopez
Copy link
Member

Failure is on the deployment of the doc as you don't have the permission to do so.

see #406

@edouard-lopez edouard-lopez merged commit da93fc7 into pure-fish:master Feb 13, 2026
7 of 8 checks passed
@gouline gouline deleted the virtual-env-prompt branch February 14, 2026 00:05
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