Run bash commands or script when opening new terminal, specific to WS project

Is there a way to run a bash command/script whenever opening a new terminal in WS?  Similar to placing a script in one's `.bash_profile` or `.zshrc`, but specifically to be run only for, and be configurable, on a project by project basis?

For example,

Right now, I have two project windows open in WS.  One is in my ~/dev/foo folder and the other is in ~/dev/bar.  I have a `cd ~/dev/foo` in my `.zshrc` since that's the project I work on the most.  I'd like to have it so the "bar" project, when I open a terminal, instead opens and runs `cd ~/dev/bar`.

Is any of this possible somehow?

1 comment

Startup scripts are loaded from `.zshrc`... There is no way to set them per-project.

0

Please sign in to leave a comment.