From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: "invalid arguments" in cpio completion
Date: Sat, 5 Nov 2016 14:52:04 -0700 [thread overview]
Message-ID: <161105145204.ZM17422@torch.brasslantern.com> (raw)
In-Reply-To: <20161105203946.GB11681@fujitsu.shahaf.local2>
On Nov 5, 8:39pm, Daniel Shahaf wrote:
}
} Danek Duvall wrote on Thu, Nov 03, 2016 at 13:32:56 -0700:
} >
} > $ local args
} > $ args+=(a b c)
} > $ print -l -- "$args[@]"
} >
} > a
} > b
} > c
} >
}
} This behaviour is the same in HEAD.
That's not new behavior; using array-append on a scalar converts the
scalar into a 1-element array before appending to it.
The question is whether an empty scalar should be converted into a
1-element array or an empty array. This goes back to the fact that
in zsh without posixbuiltins, a declared variable is implicitly set,
and therefore its value is the empty string.
BTW, in the current HEAD zsh *with* posixbuiltins, attempting to
assign an array to an exported scalar will result in an error message
*but also* causes the scalar to become set (to empty). I'm not sure
what if anything posix compatibility would say about this.
prev parent reply other threads:[~2016-11-05 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 20:32 Danek Duvall
2016-11-05 20:39 ` Daniel Shahaf
2016-11-05 21:52 ` Bart Schaefer [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=161105145204.ZM17422@torch.brasslantern.com \
--to=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).