Re: stupid scripting question: zsh

In the last episode (Jan 29), David Benfell said:
I've been upgrading my FreeBSD system into a fully-fledged desktop

zsh as installed (from the port) seems only to recognize the
/etc/zshenv startup file. And I needed an stty command to get proper
backspace/delete behavior. Because only the /etc/zshenv file seemed
to be recognized, I had to put the stty command in it.

I'd start by figuring out why the other zsh startup scripts aren't
being read. I install zsh from ports on all my systems and haven't
seen this. Are you running zsh -f, or have you unset the RCS shell
option from within zshenv? Either will prevent the other rc scripts
from being loaded. If you run "truss -f -o log zsh", do you see it try
to load zshrc?

Anyway, here's how to emulate zprofile, zshrc, and zlogin from within
zshenv (untested). Stick this at the bottom of your zshenv:

if [[ -o rcs && -o login ]] ; then
# code that would be better off in zprofile
if [[ -o rcs && -o interactive ]] ; then
# code that would be better off in zshrc
if [[ -o rcs && -o login ]] ; then
# code that would be better off in zlogin

Dan Nelson
freebsd-questions@xxxxxxxxxxx mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"