From: Mikael Magnusson <mikachu@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: zsh-workers@zsh.org
Subject: Re: regression in ${##""}
Date: Fri, 3 Jun 2011 20:55:00 +0200 [thread overview]
Message-ID: <BANLkTinWR8LuiQiHoVNABB2uuMt_U4d3TQ@mail.gmail.com> (raw)
In-Reply-To: <4DE9212A.2080601@redhat.com>
On 3 June 2011 20:00, Eric Blake <eblake@redhat.com> wrote:
> 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
Not a surprise, this is due to
28889: ${##} should return the length of $#
--
Mikael Magnusson
next prev parent reply other threads:[~2011-06-03 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 18:00 Eric Blake
2011-06-03 18:55 ` Mikael Magnusson [this message]
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=BANLkTinWR8LuiQiHoVNABB2uuMt_U4d3TQ@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=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).