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

Virtualenv should support workon command by default. #2689

Open
Almas-Ali opened this issue Feb 12, 2024 · 3 comments
Open

Virtualenv should support workon command by default. #2689

Almas-Ali opened this issue Feb 12, 2024 · 3 comments

Comments

@Almas-Ali
Copy link

Almas-Ali commented Feb 12, 2024

What's the problem this feature will solve?

We can activate a virtualenv by just typing workon env_name. This feature exists in some other virtual environment packages in Pypi. But I think this feature should in this package as well.

Describe the solution you'd like

This will help to active an environment easy with just a command and will be same for Windows and Linux or Mac as well. No more multiple commands for different operating system.

We can add a entry_points script name workon and add activation commands built in to that.

@gaborbernat
Copy link
Contributor

How would this workon behave? How does it know what to activate?

@Almas-Ali
Copy link
Author

For example you have an environment .venv you can use workon .venv to activate it. Behind the sean it detects the OS and set the path automatically. I can give it a pull request, if the maintainers agrees to do so.

@gaborbernat
Copy link
Contributor

gaborbernat commented Feb 13, 2024

PR welcome. Just make sure to implement it for all shells we support, with tests. IMHO one of the big challenges will be how to detect and adapt it to each shell.

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

No branches or pull requests

2 participants