diff options
-rw-r--r-- | common/cli_hush.c | 2 | ||||
-rw-r--r-- | test/cmd/test_echo.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/common/cli_hush.c b/common/cli_hush.c index 9466651d1a2..6cff3b11850 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -1673,7 +1673,7 @@ static int run_pipe_real(struct pipe *pi) return -1; } /* Process the command */ - return cmd_process(flag, child->argc, child->argv, + return cmd_process(flag, child->argc - i, child->argv + i, &flag_repeat, NULL); #endif } diff --git a/test/cmd/test_echo.c b/test/cmd/test_echo.c index 9d60d7d1a0b..091e4f823c9 100644 --- a/test/cmd/test_echo.c +++ b/test/cmd/test_echo.c @@ -34,6 +34,8 @@ static struct test_data echo_data[] = { */ {"setenv jQx X; echo \"a)\" ${jQx} 'b)' '${jQx}' c) ${jQx}; setenv jQx", "a) X b) ${jQx} c) X"}, + /* Test shell variable assignments without substitutions */ + {"foo=bar echo baz", "baz"}, /* Test handling of shell variables. */ {"setenv jQx; for jQx in 1 2 3; do echo -n \"${jQx}, \"; done; echo;", "1, 2, 3, "}, |