From 36450cffc837bf934f875643bf5faca69599d8fe Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 11 Apr 2023 13:22:38 +0100 Subject: ash: fix tab completion The initial index for the command and alias tables was incorrect. Change since 3165054d2: function old new delta ash_command_name - 155 +155 hush_command_name - 110 +110 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: 269/-55) Total: 214 bytes (GitHub commit #301) Signed-off-by: Ron Yorston --- shell/ash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/ash.c b/shell/ash.c index 9bb8fd805..e1c6f95ea 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -10298,7 +10298,7 @@ ash_command_name(struct exe_state *e) if (index < ARRAY_SIZE(builtintab)) return builtintab[e->e_index++].name + 1; e->e_type++; - index = 0; + index = -1; /* e->e_ptr = NULL; */ /* fall through */ case 1: @@ -10318,7 +10318,7 @@ ash_command_name(struct exe_state *e) } # if ENABLE_ASH_ALIAS e->e_type++; - index = 0; + index = -1; e->e_ptr = NULL; /* fall through */ case 2: -- cgit v1.2.3-55-g6feb