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

Add prompt customization #476

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

Conversation

jimenezj8
Copy link

@jimenezj8 jimenezj8 commented Feb 20, 2024

Grants users the option of providing a custom prompt configuration for pyenv-virtualenv by setting an environment variable (preferably, at shell initialization).

I've been using pyenv for years now, and have used this modification personally for most of that time. For those users that prefer to customize their shell prompts for clarity or vanity, this can make pyenv-virtualenv a better experience.

The default prompt looks like:

~ $ eval "$(pyenv init -)"
~ $ eval "$(pyenv virtualenv-init -)"
~ $ pyenv activate my-venv
(my-venv) ~ $

With my proposed changes:

~ $ export PYENV_VIRTUALENV_PROMPT='venv:{venv}'
~ $ eval "$(pyenv init -)"
~ $ eval "$(pyenv virtualenv-init -)"
~ $ pyenv activate my-venv
venv:my-venv ~ $

@jimenezj8 jimenezj8 marked this pull request as ready for review February 26, 2024 21:37
@jimenezj8
Copy link
Author

@native-api are there any docs on how to run tests? I updated according to a similar PR I found, but want to be thorough in my approach here

@native-api
Copy link
Member

native-api commented Feb 27, 2024

@native-api are there any docs on how to run tests? I updated according to a similar PR I found, but want to be thorough in my approach here

There's https://github.com/pyenv/pyenv/blob/02e1d4a293139ecf2c94206ee9c00b388550366e/README.md#development but it's out of date.

You run tests with make test. It also checks out the required version of Bats. To run an individual test, run <path_to_bats> <directory_or_file> -f '<test name substring>'

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.

None yet

2 participants