Commit Graph

11 Commits

Author SHA1 Message Date
Denys Vlasenko
49cc3cac30 hush: optimize ${var/pattern/repl} for trivial patterns
function                                             old     new   delta
expand_one_var                                      2353    2507    +154

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-07-27 17:53:55 +02:00
Denys Vlasenko
d4802c6243 hush: fix a='a\\'; echo "${a%\\\\}"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-03-02 20:48:36 +01:00
Denys Vlasenko
55f8133a4f shell: tweak bkslash_in_varexp.tests, add bkslash_in_varexp1.tests
It turns out bkslash_in_varexp.tests was a bash bug :]

ash and hush fail "corrected" bkslash_in_varexp.tests as well,
just not as badly as I thought (hush gets half of the cases right).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-03-02 18:12:12 +01:00
Denys Vlasenko
2d8187c139 shell/match.c: shrink by dropping double bool inversion
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-12 15:06:42 +02:00
Denys Vlasenko
701e127f7d hush: optimize #[#] and %[%] for speed. size -2 bytes.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-04 21:21:07 +02:00
Denys Vlasenko
e298ce69ba hush: fix handling of backslashes in variable assignment
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-04 19:52:44 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
7306727d1b shell: split read builtin from ash
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 22:11:24 +01:00
Denis Vlasenko
5b7589eb27 hush: fix SEGV in % expansion
function                                             old     new   delta
expand_variables                                    2203    2217     +14
2009-04-26 11:25:19 +00:00
Denis Vlasenko
1943aec2ec hush: plug the leak of expanded heredoc 2009-04-09 14:15:57 +00:00
Mike Frysinger
a4f331d3c3 implement support for parameter substitution via #/% operators 2009-04-07 06:03:22 +00:00