I work with Python Poetry and need to automate the process. Specifically, everytime I need to go to a directory with
cd /work/directory
And spawn a poetry shell with
poetry shell
and again go to another directory
cd /other/directory
to finish the work.
I would love to automate this with a small script like
#!/bin/bash
cd /work/directory
poetry shell
cd /other/directory
# do work
However whenever I run this script, I get stucks at poetry shell. Is there any option like bash's -c so that I can do following?
poetry shell -c "cd /other/directory && do work"