Let's say I have a "Work" profile in iTerm2 and want to set a different HISTFILE
for this profile, called .zsh_history_work
, so that I don't see my work commands showing up in my regular profiles.
I know that it's possible for me to switch to the different HISTFILE
by writing HISTFILE=~/.zsh_history_work
every time I open a new window with the "Work" profile. Is there a way to make this automatically happen so that I don't need to run the command all the time?