Re: [PATCH] unset/null variables should expand to 0 during arithmetic expansion

2017-02-01 Thread Michael Greenberg
Hi Martijn, > On Jan 29, 2017, at 4:13 PM, Martijn Dekker <mart...@inlv.org> wrote: > > Op 19-01-17 om 21:06 schreef Michael Greenberg: >> unset x ; echo $((x+=2)) >> >> Running bash on this program echoes the number 2 to standard out and sets x >> to 2.

[PATCH] unset/null variables should expand to 0 during arithmetic expansion

2017-01-19 Thread Michael Greenberg
ed this issue; I wrote the attached, single-line fix. Cheers, Michael Signed-off-by: Michael Greenberg <michael.greenb...@pomona.edu> — diff --git a/src/var.c b/src/var.c index cc6f7f2..e34f9cf 100644 --- a/src/var.c +++ b/src/var.c @@ -353,7 +353,7 @@ lookupvar(const char *name) intmax_t l

Re: [PATCH] Revert 78a00a7 and 3cd5386, they are not ready yet.

2018-11-15 Thread Michael Greenberg
Seconded! A test suite for dash would have saved me a great deal of trouble. I have a number of tests I've written that I'd be happy to contribute. Is dash ever tested on the POSIX test suite? Certification is expensive, but their test suite seems to be quite thorough... and it may even be

[PATCH] Bug in times builtin

2019-06-10 Thread Michael Greenberg
cluding math.h for some reason, I'm sure the computation could be done another way. Cheers, Michael Signed-off-by: Michael Greenberg diff --git a/src/bltin/times.c b/src/bltin/times.c index 8eabc1f..7e66f90 100644 --- a/src/bltin/times.c +++ b/src/bltin/times.c @@ -3,6 +3,7 @@ * This file contains code

Superseded patch?

2019-06-10 Thread Michael Greenberg
Hi all, I just noticed that an old patch of mine is marked as 'superseded' in patchwork . Was this a conscious decision not to fix the POSIX noncompliance here, an accident, or something else? Should I resubmit the patch? Cheers, Michael

[PATCH] alias: Fix handling of empty aliases

2019-05-09 Thread Michael Greenberg
pty='' $ empty $ ``` This patch fixes the parser to handle the case where an alias is empty, i.e., produces no token. Signed-off-by: Michael Greenberg diff --git a/src/parser.c b/src/parser.c index 1f9e8ec..a1d6116 100644 --- a/src/parser.c +++ b/src/parser.c @@ -470,6 +470,7 @@ next_c

[v2 PATCH] mktokens relative TMPDIR

2020-04-29 Thread Michael Greenberg
, also defaulting to /tmp. v2 ensures that TMPDIR is quoted. Signed-off-by: Michael Greenberg diff --git a/src/mktokens b/src/mktokens index cd52241..3ab7bc5 100644 --- a/src/mktokens +++ b/src/mktokens @@ -37,7 +37,9 @@ # token marks the end of a list. The third column is the name to print

Re: [BUG] one-shot variables aren't propagated past functions

2020-04-30 Thread Michael Greenberg
On 2020-04-30 06:00:01, Denton Liu wrote: > Hi all, > > I believe that I've encountered a bug in dash 0.5.10.2. With the > following input > > f () { > echo $var > } > > var=test f > echo $var > > I would expect the output to be > > test >

[v3 PATCH] mktokens relative TMPDIR

2020-04-29 Thread Michael Greenberg
, also defaulting to /tmp. v2 ensures that TMPDIR is quoted. v3 adds an extra quotation that prevents extra pathname expansions. Signed-off-by: Michael Greenberg diff --git a/src/mktokens b/src/mktokens index cd52241..3ab7bc5 100644 --- a/src/mktokens +++ b/src/mktokens @@ -37,7 +37,9 @@ # token