ash: fix breakage of ${v/pat/str}
authorRon Yorston <rmy@pobox.com>
Mon, 18 May 2015 07:59:14 +0000 (09:59 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 18 May 2015 07:59:14 +0000 (09:59 +0200)
commit417622cc2e1ce0f3bc797b3997f5728433c8ccee
tree796ecf5c5ee3850e9391bf9915723a068c3d3788
parent549deab5abd59c1ab752754170f69aa2248e72c9
ash: fix breakage of ${v/pat/str}

The commit

   ash: move parse-time quote flag detection to run-time

breaks pattern substitution in parameter expansion.  Fix this and
revise the code so that the different handling of the pattern and
the replacement string takes place in rmescapes rather than the
separate function parse_sub_pattern.

function                                             old     new   delta
rmescapes                                            227     273     +46
static.qchars                                          3       4      +1
subevalvar                                          1177    1157     -20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 47/-20)             Total: 27 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c