ash: [PARSER] Fix parsing of ${##1}
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 26 Oct 2016 13:56:53 +0000 (15:56 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 26 Oct 2016 13:56:53 +0000 (15:56 +0200)
commitf15aa57a7f5edcbf3098873b8798c0ea7f496ed7
tree5641162328f080297bd9a27cf50730dbb3a8f604
parente19923f6652a638ac39c84012e97f52cf5a7568e
ash: [PARSER] Fix parsing of ${##1}

Upstream commit:

    Date: Thu, 4 Oct 2007 22:15:10 +0800
    [PARSER] Fix parsing of ${##1}

    Previously dash treated ${##1} as a length operation.  This patch fixes that.

    Test case:

        set -- a
        echo ${##1}OK

    Old result:

        1OK

    New result:

        OK

This was a real bug in ash (but not in hush).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
shell/ash_test/ash-vars/param_expand_len.right
shell/ash_test/ash-vars/param_expand_len.tests
shell/hush_test/hush-vars/param_expand_len.right
shell/hush_test/hush-vars/param_expand_len.tests