From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1141 invoked by alias); 24 Sep 2015 03:32:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36606 Received: (qmail 21457 invoked from network); 24 Sep 2015 03:32:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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== MIME-Version: 1.0 X-Received: by 10.140.150.139 with SMTP id 133mr43755611qhw.58.1443065537988; Wed, 23 Sep 2015 20:32:17 -0700 (PDT) In-Reply-To: <150923200310.ZM32266@torch.brasslantern.com> References: <150923200310.ZM32266@torch.brasslantern.com> Date: Thu, 24 Sep 2015 05:32:17 +0200 Message-ID: Subject: Re: zrecompile -p -R/-M has no effect From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Thu, Sep 24, 2015 at 5:03 AM, Bart Schaefer 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