python-poetry / poetry-plugin-shell

MIT License
0 stars 1 forks source link

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

Open dhilipsiva opened 2 years ago

dhilipsiva commented 2 years ago

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 :stuck_out_tongue:). Please let me know if this okay and I can open a PR for this request myself.

dhilipsiva commented 2 years ago

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

tony commented 2 years ago

Related or similar to https://github.com/python-poetry/poetry-plugin-shell/issues/16