Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug report: `setopt noaliases` not respected in `local` statement without assignment.
- X-seq: zsh-workers 45652
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: "Roman Perepelitsa" <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: Bug report: `setopt noaliases` not respected in `local` statement without assignment.
- Date: Sun, 29 Mar 2020 21:12:34 +0000
- Cc: "Marlon Richert" <marlon.richert@xxxxxxxxx>, "Zsh hackers list" <zsh-workers@xxxxxxx>
- In-reply-to: <CAN=4vMoto5dGHWNO-zD=LyNTFBCPsePK+ksT+LeV_JooZHrLFQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHLkEDu76YfBKX+47pT58VAMHd=Ep7JDq8K+3jYBYCAx+W5GKA@mail.gmail.com> <CAN=4vMq_EAtuj-K9P9FpmGADX_ER5msF5aFL6MtKhcT6O+dXxQ@mail.gmail.com> <CAHLkEDurch52306wHG4q6QWt-VXxMmtJSWhBE0s-JU=wTf-VdA@mail.gmail.com> <CAN=4vMqxxC62wQD0eKCqd8kmOq09RxSAf0t+E7eThku9ngFO1A@mail.gmail.com> <20200326223449.0a090ae6@tarpaulin.shahaf.local2> <CAN=4vMpbXEL=XSji4J9NRcaBud3-+YzNXpePj0i79EDB67juRA@mail.gmail.com> <20200329204702.5c096185@tarpaulin.shahaf.local2> <CAN=4vMoto5dGHWNO-zD=LyNTFBCPsePK+ksT+LeV_JooZHrLFQ@mail.gmail.com>
Roman Perepelitsa wrote on Sun, 29 Mar 2020 21:03 +00:00:
> On Sun, Mar 29, 2020 at 10:47 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > z-sy-h handles this by saving ${options} to an associative array before
> > resetting the options so it can execute:
>
> Right. This is done in function _zsh_highlight in
> zsh-syntax-highlighting.zsh. My point is that you cannot rename
> zsh-syntax-highlighting.zsh to zsh-syntax-highlighting-impl.zsh and
> replace the original zsh-syntax-highlighting.zsh with `emulate zsh -o
> no_aliases -c 'source zsh-syntax-highlighting-impl.zsh'` because
> you'll no longer be able to access user options from _zsh_highlight.
> Sticky emulation mode is cool but in this case it provides too much
> insulation.
Yeah, the code I quoted needs to run before options are changed —
i.e., in the outer script, before the 'emulate' call. That's precisely
why that code's written in a KSH_ARRAYS-compatible way. (It wasn't
at first, but people opened bug reports…)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author