diff options
| author | Ron Yorston <rmy@pobox.com> | 2023-04-13 08:18:53 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2023-04-13 08:47:36 +0100 |
| commit | 5b309426f3a2f4f9dfda29021e45a775a4995003 (patch) | |
| tree | aaf18499d8f1afc8b7f320b11e0c4202b8f966ea /libbb | |
| parent | 36450cffc837bf934f875643bf5faca69599d8fe (diff) | |
| download | busybox-w32-tab_completion.tar.gz busybox-w32-tab_completion.tar.bz2 busybox-w32-tab_completion.zip | |
hush: code shrinktab_completion
Handle both arrays of builtin as the same type.
function old new delta
ash_command_name - 154 +154
hush_command_name - 97 +97
complete_cmd_dir_file 876 880 +4
ash_builtin_name 17 - -17
hush_builtin_name 38 - -38
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/0 up/down: 255/-55) Total: 200 bytes
In the case where ash is disabled and hush is enabled but with support
for functions disabled this reduces the bloat from 31 to 6 bytes.
(GitHub issue #301)
Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/lineedit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 5daceff16..d3882b33f 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
| @@ -878,7 +878,7 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type) | |||
| 878 | # if ENABLE_SHELL_ASH || (ENABLE_SHELL_HUSH && ENABLE_HUSH_FUNCTIONS) | 878 | # if ENABLE_SHELL_ASH || (ENABLE_SHELL_HUSH && ENABLE_HUSH_FUNCTIONS) |
| 879 | exe_state e = { 0, 0, NULL }; | 879 | exe_state e = { 0, 0, NULL }; |
| 880 | # else | 880 | # else |
| 881 | exe_state e = { 0, 0 }; | 881 | exe_state e = { 0 }; |
| 882 | # endif | 882 | # endif |
| 883 | for (;;) { | 883 | for (;;) { |
| 884 | const char *b = state->get_exe_name(&e); | 884 | const char *b = state->get_exe_name(&e); |
