Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run custom commands after zsh launches #6164

Closed
mukteshkrmishra opened this issue Jun 29, 2017 · 4 comments
Closed

How to run custom commands after zsh launches #6164

mukteshkrmishra opened this issue Jun 29, 2017 · 4 comments
Labels
Support Request for support

Comments

@mukteshkrmishra
Copy link

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.

@folixg
Copy link

folixg commented Jun 29, 2017

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

@GreatBahram
Copy link

@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

@mukteshkrmishra
Copy link
Author

Thanks!! Let me check the same.

@mcornella mcornella added the Support Request for support label Apr 7, 2019
@Aestial
Copy link

Aestial commented Jan 6, 2023

I found that using ~/.zshenv as @GreatBahram suggested made my commands run twice, at least with my configuration. You can use other configuration files if you are facing the same problem as explained here: ChrisJohnsen/tmux-MacOSX-pasteboard#23 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Request for support
Projects
None yet
Development

No branches or pull requests

5 participants