Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to keep zsh histories separate by application?

I’m using zsh for system administration and development. The development part happens mostly in VS Code where I use git commands and stuff like that. Is it possible to open a zsh instance specifically for development such that I don’t have git stuff in the history of my system terminal and vice versa? Something like a dedicated profile?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I think it’s possible, first of all make a new zsh configuration file for development(for example .zshrc_dev) and then add any customizations or configurations specific to your development environment, now in your main zsh configuration file, usually located at ~/.zshrc, add this lines at the end of file :

if [ -f ~/.zshrc_dev ]; then
    source ~/.zshrc_dev
fi

now, whenever you want to open a zsh instance specifically for development, you can do so by running the following command in your terminal:

zsh --rcfile ~/.zshrc_dev
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading