[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] lineedit: don't match applets if command contains '/'
From:       Ron Yorston <rmy () pobox ! com>
Date:       2016-10-19 13:09:52
Message-ID: 580770a0.psEqq4mBNP8ZEpDo%rmy () pobox ! com
[Download RAW message or body]

In standalone shell mode applet names are considered for tab
completion.  Only do this if the command doesn't contain a '/'.

Fixes bug 9361.

Signed-off-by: Ron Yorston <rmy@pobox.com>
---
 libbb/lineedit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 3bfff00..2cc61db 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -782,7 +782,7 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
 	pf_len = strlen(pfind);
 
 #if ENABLE_FEATURE_SH_STANDALONE && NUM_APPLETS != 1
-	if (type == FIND_EXE_ONLY) {
+	if (type == FIND_EXE_ONLY && !dirbuf) {
 		const char *p = applet_names;
 
 		while (*p) {
-- 
2.7.4

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic