<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/ash_test/ash-alias/alias_case.right, branch tilde</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=tilde</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=tilde'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2021-09-07T23:43:12+00:00</updated>
<entry>
<title>ash: parser: Fix alias expansion after heredoc or newlines</title>
<updated>2021-09-07T23:43:12+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-09-07T23:43:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=8c68ae8416c8b54222eb3cd1d4908a570147e134'/>
<id>urn:sha1:8c68ae8416c8b54222eb3cd1d4908a570147e134</id>
<content type='text'>
Upstream commit:

    Date: Wed, 29 Apr 2020 00:19:59 +1000
    parser: Fix alias expansion after heredoc or newlines

    This script should print OK:

        alias a="case x in " b=x
        a
        b) echo BAD;; esac

        alias BEGIN={ END=}
        BEGIN
    	cat &lt;&lt;- EOF &gt; /dev/null
    		$(:)
    	EOF
        END
        : &lt;&lt;- EOF &amp;&amp;
    		$(:)
        EOF
        BEGIN
    	echo OK
        END

    However, because the value of checkkwd is either zeroed when it
    shouldn't, or isn't zeroed when it should, dash currently gets
    it wrong in every case.

    This patch fixes it by saving checkkwd and zeroing it where needed.

function                                             old     new   delta
readtoken                                            157     176     +19

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
