[PATCH BlueZ 4/4] shared/shell: Fix auto-completion of invalid commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bt_shell always complements the invalid commands, which are the menu/back
command.
---
 src/shared/shell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 26194f758..f20c74901 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -498,7 +498,7 @@ static char *find_cmd(const char *text,
 	while ((cmd = entry[*index].cmd)) {
 		(*index)++;
 
-		if (!strncmp(cmd, text, len))
+		if (!strncmp(cmd, text, len) && !command_isskipped(cmd))
 			return strdup(cmd);
 	}
 
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux