public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Ronan Pigott <ronan@rjp.ie>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v2] zsh: drop no more arguments message
Date: Mon, 22 Aug 2022 16:19:10 -0700	[thread overview]
Message-ID: <20220822231909.45606-1-ronan@rjp.ie> (raw)
In-Reply-To: <CABBYNZLe2ZhgQUVs3nN_7mVxnm90n31NhUMXF7mzqUsko96-3w@mail.gmail.com>

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


  reply	other threads:[~2022-08-22 23:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Ronan Pigott [this message]
2022-08-23  0:26     ` [BlueZ,v2] " bluez.test.bot
2022-08-24 21:40     ` [PATCH BlueZ v2] " patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220822231909.45606-1-ronan@rjp.ie \
    --to=ronan@rjp.ie \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox