Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: loading user startup files for zsh scripts
>>>>> On February 8, 2011 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> The whole reason that ~/.zshenv exists is to contain commands that are
> intended to be sourced by *every* zsh including scripts. This was a
> deliberate design decision; if you don't want any such initialization
> done, you can remove that file.
The problem is that I create plenty of non-login & non-interactive
shells in which I want to use my aliases and functions (for example
those created by running commands from emacs) but those aliases and
functions really shouldn't be seen by scripts my team creates at work.
We can use '-f' in those scripts, but it is often overlooked, even by
me, who knows better. I would much rather have to opt in to this
behavior. Would it make sense to have another file sourced for all
shells that are not running scripts?
What's the best way to determine that the shell is running a script?
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author