Commit Graph

10 Commits

Author SHA1 Message Date
Denys Vlasenko
cddbb610cb hush: fix var=exit 2 not setting $? to 2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 14:27:09 +02:00
Denys Vlasenko
00243b0a1a hush: fix exit code propagation from cmd. +45 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-16 02:00:03 +01:00
Denys Vlasenko
647553a4fc hush: wait for cmd to complete, and immediately store its exitcode in $?
function                                             old     new   delta
expand_vars_to_list                                 2129    2197     +68

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 19:58:19 +01:00
Denys Vlasenko
f37eb3999b hush: fix handling of empty arguments
function                                             old     new   delta
builtin_exec                                          25      83     +58
parse_stream                                        2242    2261     +19
run_pipe                                            1782    1787      +5
static.pseudo_null_str                                 -       3      +3
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 85/0)               Total: 85 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-18 11:46:35 +02:00
Mike Frysinger
28736c36ca hush: handle empty execs
Sometimes variable expansions yield empty strings, and if they happen to
be a command someone wants to run like `$foo`, then hush currently
segfaults.  So handle `` and $().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 01:15:36 -04:00
Mike Frysinger
327fd47f36 skip some tests when fancy echo support is turned off 2009-04-09 07:50:18 +00:00
Denis Vlasenko
5c090a96f9 hush: more rodust detection of unterminated strings etc;
fix a case where we forget to copy `cmd` text;
 optimize nommu heredoc helper by not passing environment to it;
 add several tests

function                                             old     new   delta
add_till_closing_paren                               256     308     +52
parse_stream                                        2337    2378     +41
add_till_backquote                                    82     111     +29
re_execute_shell                                     269     284     +15
handle_dollar                                        802     812     +10
parse_stream_dquoted                                 316     320      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 151/0)             Total: 151 bytes
2009-04-08 21:51:33 +00:00
Denis Vlasenko
76db5adbf7 hush: fix for nested $()s with escapes + testsuite 2008-06-12 12:58:20 +00:00
Denis Vlasenko
87f40bac14 hush: more backtick and quoting fixes... 2008-06-10 22:39:37 +00:00
Denis Vlasenko
2e76c3f901 hush: fix yet another fallout
hush: move fixed testsuites out of hush-bugs/*
2008-06-10 18:27:50 +00:00