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

Re: Zsh startup files



>Is there any real difference in the function of .zprofile, .zshrc, etc?  

Yes.  .zprofile and .zlogin are used only by login shells, .zshenv is
sourced by all shells, and .zshrc is used only by interactive shells.
Roughly speaking, .zshenv should set up aliases, environment variables
and emulation-relevant options; .zshrc should do compctls and other
options; and .z(profile|login) should do tty settings, motd display and
so on.

>* How would I program a prompting mechanism, i.e. put up a prompt and wait
>for input that would be put into an env var in a script?  The "read"
>documentation is unclear and I can't figure it out.

read 'foo?prompt: '

-zefram



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