From: Danek Duvall <duvall@comfychair.org>
To: zsh-workers@zsh.org
Subject: "invalid arguments" in cpio completion
Date: Thu, 3 Nov 2016 13:32:56 -0700 [thread overview]
Message-ID: <20161103203256.GA13691@lorien.comfychair.org> (raw)
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 <TAB>
_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
next reply other threads:[~2016-11-03 20:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 20:32 Danek Duvall [this message]
2016-11-05 20:39 ` Daniel Shahaf
2016-11-05 21:52 ` Bart Schaefer
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=20161103203256.GA13691@lorien.comfychair.org \
--to=duvall@comfychair.org \
--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).