Skip to content

poetry env as an allias for poetry env activate #10266

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

Open
satk0 opened this issue Mar 11, 2025 · 2 comments · May be fixed by #10339
Open

poetry env as an allias for poetry env activate #10266

satk0 opened this issue Mar 11, 2025 · 2 comments · May be fixed by #10339
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@satk0
Copy link

satk0 commented Mar 11, 2025

Issue Kind

Change in current behaviour

Description

As written in the title. poetry shell was quicker to type especially with shell completion. If not poetry env maybe just make poetry activate alias. It would be really cool to have it typed quicker.

Impact

poetry env activate takes too long to type in my honest opinion.

Workarounds

Having to create the alias myself.

@satk0 satk0 added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Mar 11, 2025
@swills1
Copy link

swills1 commented Apr 15, 2025

Technically, you can bring back poery shell with the command poetry self add poetry-plugin-shell.

I do agree it's a bit clunky, but here are some options for future readers for the time being -

Windows:
If you go into a project and type / paste & "$(poetry env info --path)\Scripts\Activate.ps1" that will enter the project.

With that, you can add a function to your PowerShell profile.

  1. Open profile notepad $PROFILE
  2. Add a function
function psh {
    & "$(poetry env info --path)\Scripts\Activate.ps1"
}

Linux and Mac

  1. Edit your ~/.bashrc or ~/.zshrc
  2. Add this
psh() {
  source "$(poetry env info --path)/bin/activate"
}

The above was tested on Poetry 2.1.2.

Thank you.

@Sharan-Robinson Sharan-Robinson linked a pull request Apr 16, 2025 that will close this issue
2 tasks
@satk0
Copy link
Author

satk0 commented Apr 16, 2025

Thanks 😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

2 participants