zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Blake <eblake@redhat.com>
To: zsh-workers@zsh.org
Subject: regression in ${##""}
Date: Fri, 03 Jun 2011 12:00:10 -0600	[thread overview]
Message-ID: <4DE9212A.2080601@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

POSIX requires ${##""} to be parsed as ${parameter#word} with parameter
of # and word of "", which results in the output of $# with the shortest
prefix of the empty string removed (aka ${#}).  But current zsh.git
rejects this:

$ ./Src/zsh -c 'set a b; echo ${##""}'
zsh:1: bad substitution

Worse, this is a regression:

$ zsh -c 'set a b; echo ${##""}'
2
$ rpm -q zsh
zsh-4.3.10-5.fc14.x86_64

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

             reply	other threads:[~2011-06-03 18:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 18:00 Eric Blake [this message]
2011-06-03 18:55 ` Mikael Magnusson
2011-06-03 19:16   ` Eric Blake
2011-06-03 20:16   ` Peter Stephenson

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=4DE9212A.2080601@redhat.com \
    --to=eblake@redhat.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).