This is a walk-with-me-while-I-do-things series, I'm going to tell you what I learned while I'm learning
You might remember about my ordeal with bash and Catalina and zshell and iTerm. I bit the bullet and switched to zshell.
I have an alias for starting the postgres server that on bash resides on
.bashrc (by the way, did you know that
rc stands for
run commands?). With zshell, you can use
.zshrc for the same purpose.
zshell at startup reads these files for the user in the following order:
.zshenv- always read when launching the shell, no matter from where. you want the important stuff here.
.zshprofile- read at login. don't use, use
.zshlogininstead. the purpose is the same.
.zshrc- read when interactive. this is where you should put aliases, key bindings, coloring, etc.
.zshlogin- read at login, use it for things needed once the shell is set up, to execute external commands.
.zshlogout- read when the login shell exits, it should be used to release resources acquired during login.
Before each of these, zshell runs the matching files that can be found in
/etc/ for all users on the machine.