Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sourcing a sh file in zsh
- X-seq: zsh-workers 26449
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: sourcing a sh file in zsh
- Date: Mon, 26 Jan 2009 19:49:52 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:message-id :content-type:content-transfer-encoding:content-disposition; bh=anGVnNqPwiWDoJoaS2VTECyr6D8ZVoV9DBHDZG9kshE=; b=e4i7/MtSQMS9Rx1RGbh2ojY/nhGkNWx0mRz9m2kYYrl2GFCkMewf7LTcU56jdjOKja 0QBvwWwHuWpuWy7ocW12fVqyAb007wxuvmukkuvXYhdgT49wCGd0t+PYhvDFjg7HtAw+ nYHYSwJTAFM3a8klrEf8d7l9EoYMZZMZj4JxE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :message-id:content-type:content-transfer-encoding :content-disposition; b=MaPiUNhdoXZ5+cPse0MB9nC2nVEXbuJNnasX/bAPNgKlGRqvW3UIgVfo+SaHgKX9im sQ21KToL0y+wzhfgRgHmKLQ6ry+W8GYDUj0r9dyoD2GI812T1mFu5PYtiJHT05ZuMWtU ULD7I7pCzBbFw/Zyqt1PnaGJ9F+S9DtpNDCpQ=
- In-reply-to: <090125235121.ZM16865@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <BD9D2405-AD6A-4336-9C8A-85149165B6B8@xxxxxxxxx> <200901252126.46188.arvidjaar@xxxxxxxxxx> <090125235121.ZM16865@xxxxxxxxxxxxxxxxxxxxxx>
On 26 ÑÐÐÐÑÑ 2009 10:51:21 Bart Schaefer wrote:
>
> } For external script library (which is unaware of zsh in any
> } case) it is simple
> }
> } emulate sh -c "setopt sticky_emulation; source
> /my/shell/library.sh"
>
> This doesn't work, does it?
Right, because this option does not exist. Or do you mean something
else?
> "emulate sh -c ..." does not imply a
> full setopts reset at the end of the eval, only a reset of the
> emulation mode.
It does. This is exactly what LOCAL_OPTIONS does as well. Except
LOCAL_OPTIONS also preserves PRIVILEGED and RESTRICTED (which does not
seem to be documented btw). Initially I made this optional but changed
on your request :)
> Also, are you implying that "emulate sh" would
> implictly unset that setopt, requiring that it be re-asserted inside
> the eval?
>
Oh, it was just saving extra unsetopt and localizing code :)
> It just seems so much cleaner to wrap it all up in "emulate" in the
> first place.
OK; as I already said, adding extra option to emulate is really the
minor problem.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author