VSCode on Mac and Oh My Zsh - how to auto run command when terminal open?

Viewed 402

I'm on a Mac and trying to get VSCode to auto run a command when terminal is open. Everything I've tried either results in nothing happening or an error. Any and all help is much appreciated - thanks.

Settings.json below (the terminal opens but the command isn't run)

"terminal.integrated.profiles.osx": {
    "/bin/zsh (migrated)": {
        "path": "/Users/myname/.oh-my-zsh",
        "args": [
            "reload -b"
        ]
    }
},
1 Answers

Write your command in ~/.zshrc

For example I wrote:

echo 'Hello my friend!'

Now every time I open terminal (in VS Code also) I got the message.

Related