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

Let "poetry shell" subcommand take an optional "-c my_cmd" to run a custom command once the shell is initialized #17

Open
2 tasks done
dhilipsiva opened this issue Jan 6, 2022 · 2 comments

Comments

@dhilipsiva
Copy link

dhilipsiva commented Jan 6, 2022

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

poetry shell should take an additional parameter, like so: poetry shell -c "celery -A myproject worker -l debug"

Problem with poetry run approach

I understand this is possible with poetry run celery -A myproject worker -l debug accomplishes this. But the problem with this approach is that when I hit CTRL+c it deactivates the virtual env. If I have to run any Django specific commands I need to manually do poetry shell or prefix it with poetry run.

I use tmuxp to automate my development environment. I usually have multiple panes opened. Longer commands are tedious. Having a -c option would be really helpful (at least, for me 😛). Please let me know if this okay and I can open a PR for this request myself.

@dhilipsiva
Copy link
Author

Update: this will be similar to Pipenv's pipenv shell -c my_cmd

@tony
Copy link

tony commented Feb 26, 2022

Related or similar to #16

@Secrus Secrus transferred this issue from python-poetry/poetry Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants