Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zrecompile -p -R/-M has no effect
- X-seq: zsh-workers 36606
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: zrecompile -p -R/-M has no effect
- Date: Thu, 24 Sep 2015 05:32:17 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NKrBHJsQ/mB/Wsmq4W8igP62PP8xAw+/wwKbRYvv4OQ=; b=dEZ9z6617IfnljeJaWgSktw1qefA1MM0tEa0EQRZCTIkdE3FCMjrupbcugAkrIL31P ZyN8nIuw9dVMF9TPKWD78ujRE9Qgs1OH2JTPuqBDBb3ERcC1rxxGTosVohqrPDxnpf7Y 7NBS/mgMf07PmJJYck4jKCIlx3+YoexlEI84Iw7hy0JhMln+mLS82EofQg4oKcls16TW WcAj7Hv2BGNY/GFxO3h1I2DYYk8DrWf6DMavuBMQ1a8ERedgYwSFnFzBGgLCpvt1iPLM /4bMglbRWPrHxSMi6qNmpIISrDo8blrFQksOmjm0BarG78C0lrwayL3wfICEtj+G2o0U vlfw==
- In-reply-to: <150923200310.ZM32266@torch.brasslantern.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>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3QKOoxC=62Twzo9ZNqxWVv6+KAO-GFxgmoj3g5rDzJ-Jg@mail.gmail.com> <150923200310.ZM32266@torch.brasslantern.com>
On Thu, Sep 24, 2015 at 5:03 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sep 23, 11:36pm, Mikael Magnusson wrote:
> } Subject: zrecompile -p -R/-M has no effect
> }
> } % zcompile() { >&2 echo -E - zcompile "$@"; builtin zcompile "$@" }
> } % touch .zshrc; zrecompile -p -R .zshrc
> } zcompile -t .zshrc.zwc
> } re-compiling .zshrc.zwc: zcompile .zshrc.zwc .zshrc
> } succeeded
> }
> } It ate my -R.
>
> It looks (set -x) as though the first "getops :tqp opt" loop is
> consuming the -R and passing it through the the (*) branch which
> stashes it in $tmp, which is then used to shift it off $argv at
> the end of the loop.
>
> The shift expression (line 55) is
>
> shift OPTIND-${#tmp:-1}
>
> I suspect it needs to be
>
> shift OPTIND-${#tmp}-1
>
> Anyone care to confirm?
This fixes it for me, and doesn't appear to break anything else in the
process. Thanks!
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author