disambiguate $((…)) vs. $((…)…) in “typeset -f” output
This commit is contained in:
4
tree.c
4
tree.c
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.87 2017/04/06 01:59:58 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.88 2017/04/11 12:34:04 tg Exp $");
|
||||
|
||||
#define INDENT 8
|
||||
|
||||
@@ -365,6 +365,8 @@ wdvarput(struct shf *shf, const char *wp, int quotelevel, int opmode)
|
||||
case COMSUB:
|
||||
shf_puts("$(", shf);
|
||||
cs = ")";
|
||||
if (*wp == '(' /*)*/)
|
||||
shf_putc(' ', shf);
|
||||
pSUB:
|
||||
while ((c = *wp++) != 0)
|
||||
shf_putc(c, shf);
|
||||
|
Reference in New Issue
Block a user