2022-08-22 02:33:51

by Ronan Pigott

[permalink] [raw]
Subject: [PATCH BlueZ] zsh: drop no more arguments message

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.
---
completion/zsh/_bluetoothctl | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

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
--
2.37.2


2022-08-22 04:56:19

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ] zsh: drop no more arguments message

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=669604

---Test result---

Test Summary:
CheckPatch PASS 0.97 seconds
GitLint PASS 0.74 seconds
Prep - Setup ELL PASS 26.48 seconds
Build - Prep PASS 0.71 seconds
Build - Configure PASS 8.37 seconds
Build - Make PASS 815.78 seconds
Make Check PASS 11.50 seconds
Make Check w/Valgrind PASS 284.35 seconds
Make Distcheck PASS 230.86 seconds
Build w/ext ELL - Configure PASS 8.37 seconds
Build w/ext ELL - Make PASS 81.70 seconds
Incremental Build w/ patches PASS 0.00 seconds
Scan Build PASS 491.19 seconds



---
Regards,
Linux Bluetooth

2022-08-22 23:07:20

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ] zsh: drop no more arguments message

Hi Ronan,

On Sun, Aug 21, 2022 at 7:33 PM Ronan Pigott <[email protected]> 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.

It might be better to include the output of zsh when it fails to
auto-complete, or actually a pre and post patch output.

> ---
> completion/zsh/_bluetoothctl | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> 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
> --
> 2.37.2
>


--
Luiz Augusto von Dentz

2022-08-22 23:23:31

by Ronan Pigott

[permalink] [raw]
Subject: [PATCH BlueZ v2] zsh: drop no more arguments message

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(-)

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
--
2.37.2

2022-08-23 00:43:37

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,v2] zsh: drop no more arguments message

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

2022-08-24 21:54:10

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ v2] zsh: drop no more arguments message

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html