From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10144 invoked by alias); 6 Sep 2016 22:17:13 -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: 39196 Received: (qmail 1062 invoked from network); 6 Sep 2016 22:17:13 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.28):SA:0(0.0/5.0):. Processed in 0.558845 secs); 06 Sep 2016 22:17:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=JmjXeGMOHn2TyyXUJHzb70aLF/E=; b=UIn5Qi pYiCq0QsZXQTqNF1X5+Jdp/CovwnI5ojeWAv+W0sYshfIokpUDcJfsShjYUxAEg+ RXgwzgW1tycZQjr53nDQL+EgL/q7Kl9K3bsZMmM6ZPpbBXxrRevsDOJ7t6GP7/wX cET1M0nGfOyFf8d2zeLrRBvC6iOKSSjIV2Klo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=JmjXeGMOHn2TyyXUJHzb70aLF/E=; b=gdenX TfLU6nQXM43fs8l/HHrW8nSggb82rw6x3SZ28iwYt8N15R+s9InuPd5fZWpQDpeo SZXPdNZYTJGcAO7cuw5nNAKtuJe3DI/1FBghcIGkjw49W/p4Z7tuzT/Lz9C3yviV 0Jc6C8wcB0QIWtjD6A5lvox/dPodz/160FpoNY= X-Sasl-enc: VYxjxcHw6kQ9+kXs3hEbUN4kd98RmPteIkauontO2Vvl 1473200223 Date: Tue, 6 Sep 2016 22:16:24 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Cc: Yoshio Hanawa Subject: Re: Unexpected behavior for completion funcion _remote_files() Message-ID: <20160906221624.GA4800@fujitsu.shahaf.local2> References: <95820.1473177359@hydra.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <95820.1473177359@hydra.kiddle.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Oliver Kiddle wrote on Tue, Sep 06, 2016 at 17:55:59 +0200: > if zstyle -T ":completion:${curcontext}:files" remote-access; then > > # Parse options to _remote_files. Stops at the first "--". > zparseopts -D -E -a args / g:=glob h:=host > - shift > (( $#host)) && shift host || host="${IPREFIX%:}" > > + args=( ${argv[1,(I)--]} ) Should be (i), not (I), in case the [] themselves contain a '--' word.