-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
[venv] Add a CLI flag to venv to use the pwd basename as the prompt #83082
Comments
I did a Twitter poll to see if there was consistent naming of the directory people created a virtual environment into when done locally to code (the answer is no). But a common theme was people not liking that the prompt defaults to the name of the directory that the virtual environment is in and seem to prefer for it to be Maybe it makes sense to add a |
What does this buy you beyond using --prompt $(basename $PWD) ? Perhaps I'm not understanding what you're getting at - how about an example of what you mean? |
I like the idea and I think I will use it! As it's a bit long to type, I'm searching if other shorter variants could be usefull like:
being the equivalent of |
@vinay you got exactly what I mean. I had to actually teach a ton of people that shell trick with basename and pwd on Twitter, that trick doesn't seem to be something people know about, and yet a ton of people seem to be creating virtual environments with prompts manually specified like that. Plus that trick varies from shell to shell and we already have enough issues just explaining to people how to activate between Windows and UNIX and then between even shells on the same OS. So this is entirely for convenience. @julien default directory names is an entirely separate topic as people can't agree on the default name (e.g. I prefer |
Since there is already a --prompt available, I'd prefer a solution that allowed some special value(s) to be passed for this, e.g. --prompt . or perhaps --prompt __curdir__ |
If it were As for My vote is to support |
Any more feedback from anyone on the idea of using the basename of a directory if specified for |
Can this now be closed, Vinay? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: