diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-10 16:51:10 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-10 16:51:10 +0100 |
commit | 80f806cac9b418c07b149a683a4d1d989507d4d8 (patch) | |
tree | 9bd7bac2b428e973e5be1998bd14ceede39dda9f /shell | |
parent | a1184af5f87b82df34af7782f76df9a1041200f1 (diff) | |
download | busybox-w32-80f806cac9b418c07b149a683a4d1d989507d4d8.tar.gz busybox-w32-80f806cac9b418c07b149a683a4d1d989507d4d8.tar.bz2 busybox-w32-80f806cac9b418c07b149a683a4d1d989507d4d8.zip |
hush: shorten output of "help" builtin
text data bss dec hex filename
891272 485 6856 898613 db635 busybox_old
891232 485 6856 898573 db60d busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/shell/hush.c b/shell/hush.c index 7cce89183..ecef099ac 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -995,13 +995,13 @@ struct built_in_command { | |||
995 | }; | 995 | }; |
996 | 996 | ||
997 | static const struct built_in_command bltins1[] = { | 997 | static const struct built_in_command bltins1[] = { |
998 | BLTIN("." , builtin_source , "Run commands in a file"), | 998 | BLTIN("." , builtin_source , "Run commands in file"), |
999 | BLTIN(":" , builtin_true , NULL), | 999 | BLTIN(":" , builtin_true , NULL), |
1000 | #if ENABLE_HUSH_JOB | 1000 | #if ENABLE_HUSH_JOB |
1001 | BLTIN("bg" , builtin_fg_bg , "Resume a job in the background"), | 1001 | BLTIN("bg" , builtin_fg_bg , "Resume job in background"), |
1002 | #endif | 1002 | #endif |
1003 | #if ENABLE_HUSH_LOOPS | 1003 | #if ENABLE_HUSH_LOOPS |
1004 | BLTIN("break" , builtin_break , "Exit from a loop"), | 1004 | BLTIN("break" , builtin_break , "Exit loop"), |
1005 | #endif | 1005 | #endif |
1006 | BLTIN("cd" , builtin_cd , "Change directory"), | 1006 | BLTIN("cd" , builtin_cd , "Change directory"), |
1007 | #if ENABLE_HUSH_LOOPS | 1007 | #if ENABLE_HUSH_LOOPS |
@@ -1009,18 +1009,18 @@ static const struct built_in_command bltins1[] = { | |||
1009 | #endif | 1009 | #endif |
1010 | BLTIN("eval" , builtin_eval , "Construct and run shell command"), | 1010 | BLTIN("eval" , builtin_eval , "Construct and run shell command"), |
1011 | BLTIN("exec" , builtin_exec , "Execute command, don't return to shell"), | 1011 | BLTIN("exec" , builtin_exec , "Execute command, don't return to shell"), |
1012 | BLTIN("exit" , builtin_exit , "Exit"), | 1012 | BLTIN("exit" , builtin_exit , NULL), |
1013 | #if ENABLE_HUSH_EXPORT | 1013 | #if ENABLE_HUSH_EXPORT |
1014 | BLTIN("export" , builtin_export , "Set environment variables"), | 1014 | BLTIN("export" , builtin_export , "Set environment variables"), |
1015 | #endif | 1015 | #endif |
1016 | #if ENABLE_HUSH_JOB | 1016 | #if ENABLE_HUSH_JOB |
1017 | BLTIN("fg" , builtin_fg_bg , "Bring job into the foreground"), | 1017 | BLTIN("fg" , builtin_fg_bg , "Bring job into foreground"), |
1018 | #endif | 1018 | #endif |
1019 | #if ENABLE_HUSH_HELP | 1019 | #if ENABLE_HUSH_HELP |
1020 | BLTIN("help" , builtin_help , NULL), | 1020 | BLTIN("help" , builtin_help , NULL), |
1021 | #endif | 1021 | #endif |
1022 | #if MAX_HISTORY && ENABLE_FEATURE_EDITING | 1022 | #if MAX_HISTORY && ENABLE_FEATURE_EDITING |
1023 | BLTIN("history" , builtin_history , "Show command history"), | 1023 | BLTIN("history" , builtin_history , "Show history"), |
1024 | #endif | 1024 | #endif |
1025 | #if ENABLE_HUSH_JOB | 1025 | #if ENABLE_HUSH_JOB |
1026 | BLTIN("jobs" , builtin_jobs , "List jobs"), | 1026 | BLTIN("jobs" , builtin_jobs , "List jobs"), |
@@ -1038,14 +1038,14 @@ static const struct built_in_command bltins1[] = { | |||
1038 | BLTIN("read" , builtin_read , "Input into variable"), | 1038 | BLTIN("read" , builtin_read , "Input into variable"), |
1039 | #endif | 1039 | #endif |
1040 | #if ENABLE_HUSH_FUNCTIONS | 1040 | #if ENABLE_HUSH_FUNCTIONS |
1041 | BLTIN("return" , builtin_return , "Return from a function"), | 1041 | BLTIN("return" , builtin_return , "Return from function"), |
1042 | #endif | 1042 | #endif |
1043 | #if ENABLE_HUSH_SET | 1043 | #if ENABLE_HUSH_SET |
1044 | BLTIN("set" , builtin_set , "Set/unset positional parameters"), | 1044 | BLTIN("set" , builtin_set , "Set positional parameters"), |
1045 | #endif | 1045 | #endif |
1046 | BLTIN("shift" , builtin_shift , "Shift positional parameters"), | 1046 | BLTIN("shift" , builtin_shift , "Shift positional parameters"), |
1047 | #if ENABLE_HUSH_BASH_COMPAT | 1047 | #if ENABLE_HUSH_BASH_COMPAT |
1048 | BLTIN("source" , builtin_source , "Run commands in a file"), | 1048 | BLTIN("source" , builtin_source , NULL), |
1049 | #endif | 1049 | #endif |
1050 | #if ENABLE_HUSH_TRAP | 1050 | #if ENABLE_HUSH_TRAP |
1051 | BLTIN("trap" , builtin_trap , "Trap signals"), | 1051 | BLTIN("trap" , builtin_trap , "Trap signals"), |
@@ -1067,6 +1067,9 @@ static const struct built_in_command bltins1[] = { | |||
1067 | BLTIN("wait" , builtin_wait , "Wait for process"), | 1067 | BLTIN("wait" , builtin_wait , "Wait for process"), |
1068 | #endif | 1068 | #endif |
1069 | }; | 1069 | }; |
1070 | /* These builtins won't be used if we are on NOMMU and need to re-exec | ||
1071 | * (it's cheaper to run an external program in this case): | ||
1072 | */ | ||
1070 | static const struct built_in_command bltins2[] = { | 1073 | static const struct built_in_command bltins2[] = { |
1071 | #if ENABLE_HUSH_TEST | 1074 | #if ENABLE_HUSH_TEST |
1072 | BLTIN("[" , builtin_test , NULL), | 1075 | BLTIN("[" , builtin_test , NULL), |