[PATCH 1/2] hush: add [[ to the builtins list

Kang-Che Sung explorer09 at gmail.com
Tue Jan 10 19:15:17 UTC 2017


Otherwise the [[ EXPR ]] construct will not run.
"hush: can't execute '[[': No such file or directory"

It seems like this thing has not been working from the beginning :(
(commit 9d617c44d2b1135d14b7dafd01a1d3992293f4d9)

Signed-off-by: Kang-Che Sung <explorer09 at gmail.com>
---
 shell/hush.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/shell/hush.c b/shell/hush.c
index ecef099ac..68b838378 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1073,6 +1073,9 @@ static const struct built_in_command bltins1[] = {
 static const struct built_in_command bltins2[] = {
 #if ENABLE_HUSH_TEST
  BLTIN("["        , builtin_test    , NULL),
+# if ENABLE_HUSH_BASH_COMPAT
+ BLTIN("[["       , builtin_test    , NULL),
+# endif
 #endif
 #if ENABLE_HUSH_ECHO
  BLTIN("echo"     , builtin_echo    , NULL),
-- 
2.11.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-busybox-hush-test2.patch
Type: text/x-patch
Size: 1022 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20170111/adff3f91/attachment.bin>


More information about the busybox mailing list