aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-07-29 10:03:45 +0100
committerRon Yorston <rmy@pobox.com>2017-07-29 10:03:45 +0100
commitbf35303101df45b43188bacf80840034aef40c45 (patch)
treeb070fe5877d548ca604cab38028f71f62bc1210e /libbb
parent86d60bb0ceb277e500a8daabd995bc713bbdadc9 (diff)
downloadbusybox-w32-bf35303101df45b43188bacf80840034aef40c45.tar.gz
busybox-w32-bf35303101df45b43188bacf80840034aef40c45.tar.bz2
busybox-w32-bf35303101df45b43188bacf80840034aef40c45.zip
ash: remove old code to tab-complete 'busybox' in standalone shell
Diffstat (limited to 'libbb')
-rw-r--r--libbb/lineedit.c12
1 files changed, 2 insertions, 10 deletions
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)
680 num_matches++; 680 num_matches++;
681} 681}
682 682
683#if ENABLE_FEATURE_SH_STANDALONE && NUM_APPLETS != 1
684static void add_partial_match(const char *part, const char *full, int plen)
685{
686 if (strncmp(part, full, plen) == 0)
687 add_match(xstrdup(full));
688}
689#endif
690
691# if ENABLE_FEATURE_USERNAME_COMPLETION 683# if ENABLE_FEATURE_USERNAME_COMPLETION
692/* Replace "~user/..." with "/homedir/...". 684/* Replace "~user/..." with "/homedir/...".
693 * The parameter is malloced, free it or return it 685 * 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)
839 const char *p = applet_names; 831 const char *p = applet_names;
840 832
841 while (*p) { 833 while (*p) {
842 add_partial_match(pfind, p, pf_len); 834 if (strncmp(pfind, p, pf_len) == 0)
835 add_match(xstrdup(p));
843 while (*p++ != '\0') 836 while (*p++ != '\0')
844 continue; 837 continue;
845 } 838 }
846 add_partial_match(pfind, "busybox", pf_len);
847 } 839 }
848# endif 840# endif
849 841