public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] zsh: drop no more arguments message
@ 2022-08-22  2:32 Ronan Pigott
  2022-08-22  4:45 ` [BlueZ] " bluez.test.bot
  2022-08-22 22:55 ` [PATCH BlueZ] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 6+ messages in thread
From: Ronan Pigott @ 2022-08-22  2:32 UTC (permalink / raw)
  To: linux-bluetooth

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


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

* RE: [BlueZ] zsh: drop no more arguments message
  2022-08-22  2:32 [PATCH BlueZ] zsh: drop no more arguments message Ronan Pigott
@ 2022-08-22  4:45 ` bluez.test.bot
  2022-08-22 22:55 ` [PATCH BlueZ] " Luiz Augusto von Dentz
  1 sibling, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2022-08-22  4:45 UTC (permalink / raw)
  To: linux-bluetooth, ronan

[-- Attachment #1: Type: text/plain, Size: 1047 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=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


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

* Re: [PATCH BlueZ] zsh: drop no more arguments message
  2022-08-22  2:32 [PATCH BlueZ] zsh: drop no more arguments message Ronan Pigott
  2022-08-22  4:45 ` [BlueZ] " bluez.test.bot
@ 2022-08-22 22:55 ` Luiz Augusto von Dentz
  2022-08-22 23:19   ` [PATCH BlueZ v2] " Ronan Pigott
  1 sibling, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2022-08-22 22:55 UTC (permalink / raw)
  To: Ronan Pigott; +Cc: linux-bluetooth@vger.kernel.org

Hi Ronan,

On Sun, Aug 21, 2022 at 7:33 PM Ronan Pigott <ronan@rjp.ie> 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

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

* [PATCH BlueZ v2] zsh: drop no more arguments message
  2022-08-22 22:55 ` [PATCH BlueZ] " Luiz Augusto von Dentz
@ 2022-08-22 23:19   ` Ronan Pigott
  2022-08-23  0:26     ` [BlueZ,v2] " bluez.test.bot
  2022-08-24 21:40     ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 6+ messages in thread
From: Ronan Pigott @ 2022-08-22 23:19 UTC (permalink / raw)
  To: linux-bluetooth

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


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

* RE: [BlueZ,v2] zsh: drop no more arguments message
  2022-08-22 23:19   ` [PATCH BlueZ v2] " Ronan Pigott
@ 2022-08-23  0:26     ` bluez.test.bot
  2022-08-24 21:40     ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2022-08-23  0:26 UTC (permalink / raw)
  To: linux-bluetooth, ronan

[-- Attachment #1: Type: text/plain, Size: 1049 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=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


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

* Re: [PATCH BlueZ v2] zsh: drop no more arguments message
  2022-08-22 23:19   ` [PATCH BlueZ v2] " Ronan Pigott
  2022-08-23  0:26     ` [BlueZ,v2] " bluez.test.bot
@ 2022-08-24 21:40     ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+bluetooth @ 2022-08-24 21:40 UTC (permalink / raw)
  To: Ronan Pigott; +Cc: linux-bluetooth

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



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

end of thread, other threads:[~2022-08-24 21:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22  2:32 [PATCH BlueZ] zsh: drop no more arguments message Ronan Pigott
2022-08-22  4:45 ` [BlueZ] " bluez.test.bot
2022-08-22 22:55 ` [PATCH BlueZ] " Luiz Augusto von Dentz
2022-08-22 23:19   ` [PATCH BlueZ v2] " Ronan Pigott
2022-08-23  0:26     ` [BlueZ,v2] " bluez.test.bot
2022-08-24 21:40     ` [PATCH BlueZ v2] " patchwork-bot+bluetooth

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