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

Re: start zsh while skipping all files



Ok, this is a bit obscure.

I maintain several packages for the fink project on OS X, which,
essentially, is a debian package management system.  To compile and
install stuff, one typically embeds a shell script as a here document. 
For example

http://xanana.ucsc.edu/fink_10.4/10.4/unstable/main/finkinfo/sci/apbs.info

has the lines

InstallScript: <<
#!/bin/zsh -efv
make install DESTDIR=%d
rm -Rf **/CVS  # fink validate complains if this junk is left behind.
mkdir -p %i/share/%n
...
<<

We are required to invoke the shell command with -v, which I hate because
I have to watch all sorts of junk in my 600 startup files scroll by.  So
if I could invoke zsh with absolutely no sourcing of any file, and more
importantly, could be guaranteed that no user will put something
unexpected into their /etc/zshenv file, it would be nice.  Usually I wind
up just using /bin/sh but sometimes I want to use a zsh feature.

Thanks.

Bill





Matt Wozniski wrote:
>> Is there a way to start zsh and force it to skip everything,
>> including /etc/zshenv ?
>
> well.... from inside of zsh, "ARGV0=sh zsh +i" should source no files,
> I believe.  It puts zsh into sh emulation mode and tricks it into
> thinking that the shell isn't interactive, even though it is, to
> prevent sourcing /etc/profile.  The bash command to do the same would
> be "exec -a sh zsh +i".  I can think of absolutely no time when you
> would ever want to do this, though.  Are you sure that bypassing
> /etc/zshenv is actually what you want to do?  Can you give a better
> description of whatever problem you're facing?
>
> ~Matt
>
>
> On 11/23/06, William Scott <wgscott@xxxxxxxxxxxxxxxxxx> wrote:
>> Is there a way to start zsh and force it to skip everything,
>> including /etc/zshenv ?
>>
>> I RTFM and it looks like there is not
>>
>> (eg:  "/etc/zshenv   --  Always run for every zsh." )
>>
>> but I thought I should ask before giving up.
>>
>> Thanks.
>>
>> Bill
>>
>>
>>
>



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