zsh-users
 help / color / mirror / code / Atom feed
From: "William Scott" <wgscott@chemistry.ucsc.edu>
To: mjw@drexel.edu
Cc: zsh-users@sunsite.dk
Subject: Re: start zsh while skipping all files
Date: Thu, 23 Nov 2006 20:06:55 -0800 (PST)	[thread overview]
Message-ID: <32841.69.3.145.87.1164341215.squirrel@mail.acg.ucsc.edu> (raw)
In-Reply-To: <17393e3e0611231950x5288d3afn7b041c06eb127924@mail.gmail.com>

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@chemistry.ucsc.edu> 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
>>
>>
>>
>


      reply	other threads:[~2006-11-24  4:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-24  3:19 William Scott
2006-11-24  3:50 ` Matt Wozniski
2006-11-24  4:06   ` William Scott [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32841.69.3.145.87.1164341215.squirrel@mail.acg.ucsc.edu \
    --to=wgscott@chemistry.ucsc.edu \
    --cc=mjw@drexel.edu \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).