Ohmyzsh: How to run custom commands after zsh launches

Created on 29 Jun 2017  ·  3Comments  ·  Source: ohmyzsh/ohmyzsh

Hi,

I am using zsh in iTerm. On startup I put following commands in General to launch :

zsh (launches zsh).

However I want once the zsh launches then 2 commands execute (as we can do in terminal or iterm2) ie: ls && nvm use 4.2.3 (these must be executing inside zsh)

How to do this.

Support

Most helpful comment

@mukteshkrmishra you can put your script or command in ~/.zshenv and whenever zsh runs it will execute that piece of code.
if find your answer please close this issue
thanks

All 3 comments

Simply put the commands in your .zshrc, then they will be executed everytime zsh starts.

@mukteshkrmishra you can put your script or command in ~/.zshenv and whenever zsh runs it will execute that piece of code.
if find your answer please close this issue
thanks

Thanks!! Let me check the same.

Was this page helpful?
0 / 5 - 0 ratings