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

Re: Resolved: Sourcing .zshrc from .zprofile causes problems



On Sat, Aug 14, 2004 at 08:20:36PM +0200, Vincent Lefevre wrote:
> You should define LC_COLORS in your .zshenv file.

Not necessarily.  The .zshenv file is for things that are needed by all
shells, including non-interactive scripts.  As such, I would suggest
just exporting LC_COLORS from .zprofile and leaving it alone.

The only thing I have in my .zshenv script is this:

if [[ $SHLVL == 1 && ! -o LOGIN ]]; then
    source ~/.zprofile
fi

This is a kludge that ensured that an xterm that didn't start with any
of my login settings sourced my .zprofile.  I'm not sure if it's still
needed with a modern X Windows setup, though.  Hmm, I wonder if that
works right with a cron-initiated zsh script?  Perhaps not...

I used to set things like the PATH in the .zshenv file until it caused
me problems using gdb:  gdb runs the executable using $SHELL, and that
caused some of my debug environment settings to get overridden (ouch).

..wayne..



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