Provide online help for hush commands 'if', 'for', and 'while'.

Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---
 common/cli_hush.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/common/cli_hush.c b/common/cli_hush.c
index 955e8fe536..d7dfa8a75a 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -3711,5 +3711,24 @@ U_BOOT_CMD(
        "    - print value of hushshell variable 'name'"
 );

+U_BOOT_CMD(
+       for, 0, 0, NULL,
+       "execute command for each member of a list",
+       "NAME in WORDS; do COMMANDS; done"
+);
+
+U_BOOT_CMD(
+       if, 0, 0, NULL,
+       "execute commands based on condition",
+       "COMMANDS; then COMMANDS; "
+       "[ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi"
+);
+
+U_BOOT_CMD(
+       while, 0, 0, NULL,
+       "execute commands as long as a test succeeds",
+       "COMMANDS; do COMMANDS; done"
+);
+
 #endif
 /****************************************************************************/
--
2.20.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to