You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2019/10/17 11:47:19 UTC
[mynewt-core] 11/21: sys/shell: Fix select command completion
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 8958b7def509d563b4f2368d85ae41457ea7401a
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Wed Oct 16 10:50:18 2019 +0200
sys/shell: Fix select command completion
Auto completion did not work for 'select' command when
default module was selected.
Code looked like it was not intended.
Now modules completion works.
---
sys/shell/src/shell.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/sys/shell/src/shell.c b/sys/shell/src/shell.c
index 789ad30..610bb58 100644
--- a/sys/shell/src/shell.c
+++ b/sys/shell/src/shell.c
@@ -794,9 +794,6 @@ complete_select(char *line, char *cur,
cur += tok_len + 1;
tok_len = get_token(&cur, &null_terminated);
if (tok_len == 0) {
- if (default_module != -1) {
- return;
- }
console_printf("\n");
print_modules(streamer_console_get());
print_prompt();
@@ -805,9 +802,7 @@ complete_select(char *line, char *cur,
}
if (null_terminated) {
- if (default_module == -1) {
- complete_module(line, cur, tok_len, append_char);
- }
+ complete_module(line, cur, tok_len, append_char);
}
}