Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh handling of non-standard if-evaluations
- X-seq: zsh-users 11153
- From: Daniel Qarras <dqarras@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: zsh handling of non-standard if-evaluations
- Date: Sun, 28 Jan 2007 12:25:45 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=DUA+DFVwPG+UOBrsMAk4WUwYiPUvCWa74OsQW9YC9AoPzeu4OpWCLh2tITQjmFk0jT/70r4fqzEZ6tI81EhhmgKLcQcULPf9z7ciHSsCSSk2cxS/liSqXdTQImWAX2p126xAN1Xs4qadtW71Ov/yU8P8GklIE4TDt7DP2oIGnWI=;
- In-reply-to: <070128120533.ZM730@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi!
> } Hmm, my login shell is zsh and I've set in my ~/.zshenv:
> }
> } . /etc/profile
> }
> } which in turns goes thru /etc/profile.d/*.sh and one of those
> scripts
> } is from the proprietary application. So perhaps I should do "setopt
> } no_equals" before the above mentioned line?
>
> Generally speaking ~/.zshenv is too early in the startup script order
> to be reading /etc/profile from there. If you need to read
> /etc/profile you should do it from ~/.zprofile.
Good point. I definitely need to do it, I have an account on several
machines where admins and applications add scripts under /etc/profile.d
to set up various things like paths and variables.
> your original state, you need something like this:
>
> zmodload -i zsh/parameter && {
> __zsh=( ${(kv)options} )
> emulate sh
> . /etc/profile
> emulate zsh
> options=( $__zsh )
> unset __zsh
> }
>
> This has the side-effect of vacating any option settings from any
> scripts
> in /etc/profile.d that happen to know about zsh, but I think of that
> as a good thing.
I need to test this a bit. I'll get back to this when I've done some
experiments.
Thanks!
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news
Messages sorted by:
Reverse Date,
Date,
Thread,
Author