ash,hush: properly handle ${v//pattern/repl} if pattern starts with /
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 4 Aug 2018 20:25:28 +0000 (22:25 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 4 Aug 2018 20:25:28 +0000 (22:25 +0200)
commitc2aa218f23a4e952746ebef7bb86668c6255471c
tree6a2884b85c52a31ad9b69e7bd2cde5d688fa139e
parent2005d3ff3661220f11e8ff1911b24051b3669566
ash,hush: properly handle ${v//pattern/repl} if pattern starts with /

Closes 2695

function                                             old     new   delta
parse_dollar                                         762     790     +28
subevalvar                                          1258    1267      +9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 37/0)               Total: 37 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.right [new file with mode: 0644]
shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.tests [new file with mode: 0755]
shell/hush.c
shell/hush_test/hush-vars/var_bash_pattern_starting_with_slash.right [new file with mode: 0644]
shell/hush_test/hush-vars/var_bash_pattern_starting_with_slash.tests [new file with mode: 0755]