I'd like to be able to open my projects easily using one command in terminal instead of doing what I normally do. I tried creating a command like this in my .zshrc:
my_project() { cd my_folder source venv/bin/activate jupyter notebook }
Normally if I enter these commands one at a time it opens fine. But I'd rather just run my command and it do everything for me and automatically launch the notebook. When I run this however, it just goes into the folder and stops without running the rest of the commands after it. How do I make it run them one after another?
Figured it out! You can run commands after one another by using a semicolon (;). For example using the above code:
my_project() { cd my_folder; source venv/bin/activate; jupyter notebook; }
2.1m questions
2.1m answers
60 comments
57.0k users