Skip to content

Consider prompting the user to run eval $(poetry env activate) when they mistakenly run poetry shell #10177

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

Closed
daviewales opened this issue Feb 14, 2025 · 5 comments · May be fixed by #10181
Closed
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@daviewales
Copy link

Issue Kind

Brand new capability

Description

Once upon a time, the steps required to activate a poetry shell were simple and easy to remember:

poetry shell

Then came 2.0, and the removal of poetry shell (to fix some bugs).

But now, I can never remember what to run to get me into a poetry shell.

It would be nice if when I run poetry shell, instead of printing The command "shell" does not exist, instead, it printed a helpful message such as:

Since 2.0, `poetry shell` no longer exists. To activate a poetry shell, run:
eval $(poetry env activate)

Impact

This would save me needing to look up the documentation when I can't remember how to activate a poetry shell.

Workarounds

I can just look up the documentation.

@daviewales daviewales added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Feb 14, 2025
@dimbleby
Copy link
Contributor

Already the case per #10053

@Secrus
Copy link
Member

Secrus commented Feb 14, 2025

Already present on main.

@Secrus Secrus closed this as completed Feb 14, 2025
@daviewales
Copy link
Author

It's close, but not quite what I was requesting.
I was hoping that the error message would include the exact text eval $(poetry env activate) which saves me a context switch to the documentation.

The linked PR only mentions env activate without the rest of the command required to activate the venv. It seems a shame not to include the full command.

@dimbleby
Copy link
Contributor

that would be too platform-specific

but if you want to propose a change to the wording the best way is to submit a pull request

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants