zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: zrecompile -p -R/-M has no effect
Date: Thu, 24 Sep 2015 05:32:17 +0200	[thread overview]
Message-ID: <CAHYJk3SS2z3cR83mBBzyE62QHAoJ_i=-JkrC6awOMPadjoXqnQ@mail.gmail.com> (raw)
In-Reply-To: <150923200310.ZM32266@torch.brasslantern.com>

On Thu, Sep 24, 2015 at 5:03 AM, Bart Schaefer
<schaefer@brasslantern.com> 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


      reply	other threads:[~2015-09-24  3:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 21:36 Mikael Magnusson
2015-09-24  3:03 ` Bart Schaefer
2015-09-24  3:32   ` Mikael Magnusson [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='CAHYJk3SS2z3cR83mBBzyE62QHAoJ_i=-JkrC6awOMPadjoXqnQ@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).