<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/ash_test/ash-vars, 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-07T16:16:45+00:00</updated>
<entry>
<title>ash: LINENO starts from 0 in -c SCRIPT mode</title>
<updated>2021-09-07T16:16:45+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-09-07T16:16:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=64aa86b720641cb50be9636e6c20d4dbbea6fed0'/>
<id>urn:sha1:64aa86b720641cb50be9636e6c20d4dbbea6fed0</id>
<content type='text'>
The var_LINENO3.tests fails for hush: it does start from 0, but does not increment.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: fix LINENO in functions</title>
<updated>2021-09-07T16:01:49+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-09-07T16:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d6c9cbc0727cc3875672ae280ec129514a9d8594'/>
<id>urn:sha1:d6c9cbc0727cc3875672ae280ec129514a9d8594</id>
<content type='text'>
From larger patch by Roberto A. Foglietta &lt;roberto.foglietta@gmail.com&gt;

function                                             old     new   delta
evalfun                                              348     369     +21
ash_main                                            1202    1218     +16
setinputstring                                        65      73      +8
lookupvar                                            116     106     -10
evaltree                                             772     753     -19
evalsubshell                                         192     173     -19
evalfor                                              175     156     -19
evalcase                                             273     254     -19
evalcommand                                         1560    1536     -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/6 up/down: 45/-110)           Total: -65 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ahell: update testsuite</title>
<updated>2021-07-25T20:03:16+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-07-25T20:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=05c5d745f7b14e265144489b7809a3d6dbbadec6'/>
<id>urn:sha1:05c5d745f7b14e265144489b7809a3d6dbbadec6</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: match bash behavior for ${empty_var/*/repl}</title>
<updated>2021-01-09T07:46:54+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-01-09T07:46:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=2b7c1aa92c68524559a2067609d09309d5c09adc'/>
<id>urn:sha1:2b7c1aa92c68524559a2067609d09309d5c09adc</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: fix ${unset_var/pattern/repl}</title>
<updated>2021-01-09T07:27:37+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-01-09T07:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=883cdb79a440d0425766f67aaef0cabde0a5060e'/>
<id>urn:sha1:883cdb79a440d0425766f67aaef0cabde0a5060e</id>
<content type='text'>
function                                             old     new   delta
subevalvar                                          1349    1353      +4

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: parser: Only accept single-digit parameter expansion outside of braces</title>
<updated>2020-02-17T09:15:35+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-02-17T09:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c2ce888030b6b880b3229520a8ff7d7026248a9a'/>
<id>urn:sha1:c2ce888030b6b880b3229520a8ff7d7026248a9a</id>
<content type='text'>
Upstream commit:

    Date: Mon, 27 May 2019 13:39:37 +0800
    parser: Only accept single-digit parameter expansion outside of braces

    This patch should fix the problem.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: remove test for "echo ${-}" errorring out - now it works</title>
<updated>2019-05-19T14:35:56+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-05-19T14:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=30a4c32a4d21728a7e25025f70fcc1d7cd722fe0'/>
<id>urn:sha1:30a4c32a4d21728a7e25025f70fcc1d7cd722fe0</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix quoted "${notexist-}" expansion to not disappear</title>
<updated>2019-05-15T11:39:19+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-05-15T11:39:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9e0adb9b09ec14afe2e5a222dda1c447f336ea06'/>
<id>urn:sha1:9e0adb9b09ec14afe2e5a222dda1c447f336ea06</id>
<content type='text'>
function                                             old     new   delta
expand_one_var                                      2296    2311     +15

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: expand: Fix ghost fields with unquoted $@/$*</title>
<updated>2018-08-05T12:29:58+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T12:29:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=440da97ed79841b55f0b61e4108a336b61642bff'/>
<id>urn:sha1:440da97ed79841b55f0b61e4108a336b61642bff</id>
<content type='text'>
Upstream commit:

    Date: Fri, 23 Mar 2018 18:58:47 +0800
    expand: Fix ghost fields with unquoted $@/$*

    You're right.  The proper fix to this is to ensure that nulonly
    is not set in varvalue for $*.  It should only be set for $@ when
    it's inside double quotes.

    In fact there is another bug while we're playing with $@/$*.
    When IFS is set to a non-whitespace character such as :, $*
    outside quotes won't remove empty fields as it should.

    This patch fixes both problems.

    Reported-by: Martijn Dekker &lt;martijn@inlv.org&gt;
    Suggested-by: Harald van Dijk &lt;harald@gigawatt.nl&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
argstr                                              1111    1113      +2
evalvar                                              571     569      -2
varvalue                                             579     576      -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 2/-5)               Total: -3 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: eval: Variable assignments on functions are no longer persistent</title>
<updated>2018-08-05T09:14:11+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T08:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9abf53beb48b40e98d50fd35f445d6474af3a494'/>
<id>urn:sha1:9abf53beb48b40e98d50fd35f445d6474af3a494</id>
<content type='text'>
Upstream commit:

    Date: Wed, 4 Apr 2018 17:54:01 +0800
    eval: Variable assignments on functions are no longer persistent

    Dirk Fieldhouse &lt;fieldhouse@gmx.net&gt; wrote:
    &gt; In POSIX.1-2017 ("simultaneously IEEE Std 1003.1™-2017 and The Open
    &gt; Group Technical Standard Base Specifications, Issue 7")
    &gt; &lt;http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09&gt;,
    &gt; we read under '2.9.1 Simple Commands'
    &gt;
    &gt; "Variable assignments shall be performed as follows:
    &gt; ...
    &gt; -    If the command name is a standard utility implemented as a function
    &gt; (see XBD Utility), the effect of variable assignments shall be as if the
    &gt; utility was not implemented as a function.
    &gt; ...
    &gt; -    If the command name is a function that is not a standard utility
    &gt; implemented as a function, variable assignments shall affect the current
    &gt; execution environment during the execution of the function. It is
    &gt; unspecified:
    &gt;
    &gt;     *   Whether or not the variable assignments persist after the
    &gt; completion of the function
    &gt;
    &gt;     *   Whether or not the variables gain the export attribute during
    &gt; the execution of the function
    &gt;
    &gt;     *   Whether or not export attributes gained as a result of the
    &gt; variable assignments persist after the completion of the function (if
    &gt; variable assignments persist after the completion of the function)"

    POSIX used to require the current dash behaviour.  However, you're
    right that this is no longer the case.

    This patch will remove the persistence of the variable assignment.

    I have considered the exporting the variables during the function
    execution but have decided against it because:

    1) It makes the code bigger.
    2) dash has never done this in the past.
    3) You cannot use this portably anyway.

    Reported-by: Dirk Fieldhouse &lt;fieldhouse@gmx.net&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
evalcommand                                         1606    1635     +29
evalcase                                             313     317      +4
evalfun                                              280     268     -12
pushlocalvars                                         48       -     -48
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/1 up/down: 33/-60)            Total: -27 bytes

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