Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: regression in ${##""}
- X-seq: zsh-workers 29447
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Eric Blake <eblake@xxxxxxxxxx>
- Subject: Re: regression in ${##""}
- Date: Fri, 3 Jun 2011 20:55:00 +0200
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=fwYRdelpdevpJidUt5gtiBJpNK/TiCocnNSKKFBvmb0=; b=rTUBoV6KaLKDbvhFCvckok5NU8uD8/AqXIss6l/iFJN0V4OnM3sv+JNCpAZlMtbwrq 6YmpAs43GJaFNyf9VCWsZftbU+uCPYRJl9lDSSijf3ahDxnYh+jAy7g+evN+6bja6G/l 0X2/j1Wy+PgdMutlZ1WWIhxu3G1nosDdoriZQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=RDoGC79UAild38HwJMzT8MRk75G45lXrN5S0d2s0MCyeR1Z3su0SAIZnLqIVsPCzNJ R1RpnsivlmjBfSWlMLLzy7/W2wSEX9DxlMGczAa4nzumREmguRK6/RcMldt+C30B6/xg 0md644Ndr0SW3Ll20RxgRyRUKyVaS+CM4lurk=
- In-reply-to: <4DE9212A.2080601@redhat.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <4DE9212A.2080601@redhat.com>
On 3 June 2011 20:00, Eric Blake <eblake@xxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author