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

Spawns a shell within the virtualenv #134

Closed
nikaro opened this issue May 23, 2018 · 14 comments
Closed

Spawns a shell within the virtualenv #134

nikaro opened this issue May 23, 2018 · 14 comments

Comments

@nikaro
Copy link

nikaro commented May 23, 2018

It would be nice to have a command poetry shell that acts like pipenv shell, instead of having to source ~/.cache/pypoetry/…/bin/activate.

@digitalresistor
Copy link
Contributor

poetry run <your shell binary here>?

@nikaro
Copy link
Author

nikaro commented May 24, 2018

Perfect! I didn't think to test that…

@nikaro nikaro closed this as completed May 24, 2018
@NotAFile
Copy link

NotAFile commented Jun 4, 2018

I'd like to see this reopened. It would be neat to have this as a convenient shortcut. After all, poetry already knows what my shell is, so why do I need to tell it again?

@nikaro
Copy link
Author

nikaro commented Jun 5, 2018

I reopen and let @sdispater decide what to do of this.

@nikaro nikaro reopened this Jun 5, 2018
@digitalresistor
Copy link
Contributor

@NotAFile how does poetry already know what your shell is?

@NotAFile
Copy link

NotAFile commented Jun 5, 2018

@bertjwregeer through the SHELL environment variable

@digitalresistor
Copy link
Contributor

@NotAFile which may or may not be set, and may or may not be set to the correct shell...

@NotAFile
Copy link

NotAFile commented Jun 5, 2018

@bertjwregeer Sure. Alternatives would have to be found for Windows. It's probably worth looking at how similar projects handle this. For *NIX I don't see anything wrong with using $SHELL. It's set by your shell, and if your shell doesn't know what shell it is, perhaps you have bigger problems...

Even then, if someone has an extremely weird setup where SHELL is somehow not the shell, it's not like the trusty normal "run" command wouldn't still be there.

@tadeoos
Copy link
Contributor

tadeoos commented Jun 17, 2018

Hey, this is being implemented - check out #198 :)

@cauebs
Copy link
Contributor

cauebs commented Jun 19, 2018

This feature is being worked on in #201 and I'll happy to hear your feedback. If you know something about Windows and are willing to help, I'd like to be able to know how to properly detect the correct shell, if it's not cmd, and if it's working at all! Any feedback is appreciated :)

@emmatyping
Copy link

emmatyping commented Jun 19, 2018

@cauebs, re better Windows support, the best option is to use what pipenv patched pew to do https://github.com/pypa/pipenv/blob/master/pipenv/patched/pew/_win_utils.py. Sadly you have to enumerate all processes to find your parent :/

@cauebs
Copy link
Contributor

cauebs commented Jun 29, 2018

poetry shell is now available in version 0.11

@NotAFile
Copy link

Awesome! Poetry is now my tool of choice.

Copy link

github-actions bot commented Mar 3, 2024

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 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants