Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: regression in ${##""}



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