python-poetry / python-poetry/poetry-plugin-shell
Let "poetry shell" subcommand take an optional "-c my_cmd" to run a custom command once the shell is initialized
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 141
- Forks
- 10
- Avg merge
- 59m
- Merged PRs (30d)
- 3
Description
- 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the poetry shell subcommand currently handles arguments and how poetry run differs when CTRL+c is pressed. Use the requested command form, poetry shell -c "celery -A myproject worker -l debug", as the acceptance case; done means the custom command runs after shell initialization while the shell remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100