Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: help with understanding diffs in startup files



Timothy J Luoma wrote:
>I've always just used one init file.  Perhaps this would be a good time to  
>learn what should go in what file.

Approximately speaking...

>Where should variables go?
>functions?

.zshenv

>aliases?
>bindkeys?

.zshrc

Actually, the division isn't that simple.  .zshenv should set up your
normal shell environment, including many options, most functions and
most variables.  .zshrc should set up your interactive shell environment,
including many options, all bindkeys and compctls, aliases, and functions
and variables that are only used interactively (such as compctl functions
and $HISTCHARS).  .zprofile (or .zlogin if you prefer) should contain
commands to run when you log in, and should not affect the environment
at all.

-zefram



Messages sorted by: Reverse Date, Date, Thread, Author