From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22628 invoked by alias); 3 Nov 2016 20:44:24 -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: 39827 Received: (qmail 17029 invoked from network); 3 Nov 2016 20:44:24 -0000 X-Qmail-Scanner-Diagnostics: from lorien.comfychair.org 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(173.8.144.98):SA:0(-2.3/5.0):. Processed in 0.321375 secs); 03 Nov 2016 20:44:24 -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=-2.3 required=5.0 tests=RP_MATCHES_RCVD,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: duvall@lorien.comfychair.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at lorien.comfychair.org designates 173.8.144.98 as permitted sender) Date: Thu, 3 Nov 2016 13:32:56 -0700 From: Danek Duvall To: zsh-workers@zsh.org Subject: "invalid arguments" in cpio completion Message-ID: <20161103203256.GA13691@lorien.comfychair.org> Mail-Followup-To: Danek Duvall , zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2010-04-22) This is on 5.2, but I don't see any changes to either _cpio or _arguments between then and HEAD that appear to be relevant. Here's the problem: $ cpio -p _arguments:comparguments:313: invalid argument: The comparguments call is +_arguments:313> comparguments -i '' -s : '' '-d[create directories as needed]' '-l[link files instead of copying]' '-L[follow symbolic links]' '-m[preserve file modification times]' '-R[set user and group for files]:user (and group) for files:->user' '*:destination directory:_files -/' '-a[reset access time of input files]' I'm guessing that it's the empty argument after "-s :", but I'm not sure. That seems to be coming from this oddity: $ local args $ args+=(a b c) $ print -l -- "$args[@]" a b c But explicitly declaring args as an array makes it work: $ local -a args $ args+=(a b c) $ print -l -- "$args[@]" a b c and making that change in _cpio makes the completion work. I'm just not sure if the += construct on a scalar is supposed to make any sense here. Thanks, Danek