public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez PATCH] shared/shell: don't allow completion fallback
@ 2021-09-03 14:01 Alain Michaud
  2021-09-03 14:33 ` [Bluez] " bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Alain Michaud @ 2021-09-03 14:01 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz; +Cc: Alain Michaud

When using bluetoothctl, if the user enters a quotation mark before
pressing tab, the completion handler falls back to the shell's handler
which ends up printing the current folder's file content.  This behavior
is never desired in bt_shell's menu.

This was verified by typing " then tab-tab before and after the change as
been made to confirm the desired behavior and verified that all other
argument completions (such as address completion) continues to function.

---

 src/shared/shell.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 21e8b50cd..cbb9b8b88 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -903,6 +903,8 @@ static char **shell_completion(const char *text, int start, int end)
 {
 	char **matches = NULL;
 
+	rl_attempted_completion_over = 1;
+
 	if (!data.menu)
 		return NULL;
 
@@ -925,9 +927,6 @@ static char **shell_completion(const char *text, int start, int end)
 		matches = rl_completion_matches(text, cmd_generator);
 	}
 
-	if (!matches)
-		rl_attempted_completion_over = 1;
-
 	return matches;
 }
 
-- 
2.33.0.153.gba50c8fa24-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [Bluez] shared/shell: don't allow completion fallback
  2021-09-03 14:01 [Bluez PATCH] shared/shell: don't allow completion fallback Alain Michaud
@ 2021-09-03 14:33 ` bluez.test.bot
  2021-09-04  0:33   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: bluez.test.bot @ 2021-09-03 14:33 UTC (permalink / raw)
  To: linux-bluetooth, alainm

[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=541783

---Test result---

Test Summary:
CheckPatch                    PASS      0.27 seconds
GitLint                       PASS      0.12 seconds
Prep - Setup ELL              PASS      40.85 seconds
Build - Prep                  PASS      0.10 seconds
Build - Configure             PASS      7.13 seconds
Build - Make                  PASS      177.53 seconds
Make Check                    PASS      8.82 seconds
Make Distcheck                PASS      211.31 seconds
Build w/ext ELL - Configure   PASS      7.27 seconds
Build w/ext ELL - Make        PASS      169.16 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez] shared/shell: don't allow completion fallback
  2021-09-03 14:33 ` [Bluez] " bluez.test.bot
@ 2021-09-04  0:33   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-09-04  0:33 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org; +Cc: Alain Michaud

Hi Alain,

On Fri, Sep 3, 2021 at 7:37 AM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=541783
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    PASS      0.27 seconds
> GitLint                       PASS      0.12 seconds
> Prep - Setup ELL              PASS      40.85 seconds
> Build - Prep                  PASS      0.10 seconds
> Build - Configure             PASS      7.13 seconds
> Build - Make                  PASS      177.53 seconds
> Make Check                    PASS      8.82 seconds
> Make Distcheck                PASS      211.31 seconds
> Build w/ext ELL - Configure   PASS      7.27 seconds
> Build w/ext ELL - Make        PASS      169.16 seconds
>
> Details
> ##############################
> Test: CheckPatch - PASS
> Desc: Run checkpatch.pl script with rule in .checkpatch.conf
>
> ##############################
> Test: GitLint - PASS
> Desc: Run gitlint with rule in .gitlint
>
> ##############################
> Test: Prep - Setup ELL - PASS
> Desc: Clone, build, and install ELL
>
> ##############################
> Test: Build - Prep - PASS
> Desc: Prepare environment for build
>
> ##############################
> Test: Build - Configure - PASS
> Desc: Configure the BlueZ source tree
>
> ##############################
> Test: Build - Make - PASS
> Desc: Build the BlueZ source tree
>
> ##############################
> Test: Make Check - PASS
> Desc: Run 'make check'
>
> ##############################
> Test: Make Distcheck - PASS
> Desc: Run distcheck to check the distribution
>
> ##############################
> Test: Build w/ext ELL - Configure - PASS
> Desc: Configure BlueZ source with '--enable-external-ell' configuration
>
> ##############################
> Test: Build w/ext ELL - Make - PASS
> Desc: Build BlueZ source with '--enable-external-ell' configuration
>
>
>
> ---
> Regards,
> Linux Bluetooth

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-04  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-03 14:01 [Bluez PATCH] shared/shell: don't allow completion fallback Alain Michaud
2021-09-03 14:33 ` [Bluez] " bluez.test.bot
2021-09-04  0:33   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox