diff mbox series

[BlueZ,v2] zsh: drop no more arguments message

Message ID 20220822231909.45606-1-ronan@rjp.ie
State Superseded
Headers show
Series [BlueZ,v2] zsh: drop no more arguments message | expand

Commit Message

Ronan Pigott Aug. 22, 2022, 11:19 p.m. UTC
This usage of the _message as a completion function is invalid, and
will result in an error if invoked by _arguments when the user has a
format style set for completion messages.

We can just drop this message, since it is not necessary.

Before:
  $ zstyle ':completion:*:messages' format '%d'
  $ bluetoothctl connect <TAB>
  _message:zformat:42: invalid argument: -J

After:
  $ zstyle ':completion:*:messages' format '%d'
  $ bluetoothctl connect <TAB>
  31:41:59:26:53:59  -- Bose QuietComfort 35
  11:22:33:44:55:66  -- Pixel 5
---

Included an example of the erroneous output and style setting

 completion/zsh/_bluetoothctl | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 23, 2022, 12:26 a.m. UTC | #1
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=669941

---Test result---

Test Summary:
CheckPatch                    PASS      0.64 seconds
GitLint                       PASS      0.46 seconds
Prep - Setup ELL              PASS      33.11 seconds
Build - Prep                  PASS      0.74 seconds
Build - Configure             PASS      10.55 seconds
Build - Make                  PASS      953.56 seconds
Make Check                    PASS      12.72 seconds
Make Check w/Valgrind         PASS      343.01 seconds
Make Distcheck                PASS      293.02 seconds
Build w/ext ELL - Configure   PASS      10.52 seconds
Build w/ext ELL - Make        PASS      98.24 seconds
Incremental Build w/ patches  PASS      0.00 seconds
Scan Build                    PASS      594.20 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 24, 2022, 9:40 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 22 Aug 2022 16:19:10 -0700 you wrote:
> This usage of the _message as a completion function is invalid, and
> will result in an error if invoked by _arguments when the user has a
> format style set for completion messages.
> 
> We can just drop this message, since it is not necessary.
> 
> Before:
>   $ zstyle ':completion:*:messages' format '%d'
>   $ bluetoothctl connect <TAB>
>   _message:zformat:42: invalid argument: -J
> 
> [...]

Here is the summary with links:
  - [BlueZ,v2] zsh: drop no more arguments message
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7c2f0c037e92

You are awesome, thank you!
diff mbox series

Patch

diff --git a/completion/zsh/_bluetoothctl b/completion/zsh/_bluetoothctl
index bf35e503e..610ca2b8d 100644
--- a/completion/zsh/_bluetoothctl
+++ b/completion/zsh/_bluetoothctl
@@ -68,8 +68,7 @@  _bluetoothctl() {
 		'(info)'{-m,--monitor}'[Enable monitor output]' \
 		+ 'command' \
 		'(info):command:->command' \
-		'(info):: :->argument' \
-		': :_message "no more arguments"'
+		'(info):: :->argument'
 
 	if [[ $state == "command" ]]; then
 		_describe -t commands 'command' all_commands