From bf35303101df45b43188bacf80840034aef40c45 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 29 Jul 2017 10:03:45 +0100 Subject: ash: remove old code to tab-complete 'busybox' in standalone shell --- libbb/lineedit.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index a28b6ef98..a93e28975 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -680,14 +680,6 @@ static void add_match(char *matched) num_matches++; } -#if ENABLE_FEATURE_SH_STANDALONE && NUM_APPLETS != 1 -static void add_partial_match(const char *part, const char *full, int plen) -{ - if (strncmp(part, full, plen) == 0) - add_match(xstrdup(full)); -} -#endif - # if ENABLE_FEATURE_USERNAME_COMPLETION /* Replace "~user/..." with "/homedir/...". * The parameter is malloced, free it or return it @@ -839,11 +831,11 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type) const char *p = applet_names; while (*p) { - add_partial_match(pfind, p, pf_len); + if (strncmp(pfind, p, pf_len) == 0) + add_match(xstrdup(p)); while (*p++ != '\0') continue; } - add_partial_match(pfind, "busybox", pf_len); } # endif -- cgit v1.2.3-55-g6feb