From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH BlueZ 4/5] client: Display command even with no description
Date: Wed, 19 Jun 2013 12:02:59 -0300 [thread overview]
Message-ID: <CAMOw1v5zqFEhjNZr3Cip==i6y2g8xka1FBuFua-7uG1h3AyMKw@mail.gmail.com> (raw)
In-Reply-To: <E6494223-A95C-473F-B274-7C623C690BB1@holtmann.org>
On Wed, Jun 19, 2013 at 11:54 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Lucas,
>
>>>>>> Having no description doesn't mean it's not an available command. So add
>>>>>> command to the output of "help" command, even if it has no description.
>>>>>> ---
>>>>>> client/main.c | 5 ++---
>>>>>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/client/main.c b/client/main.c
>>>>>> index b0a66d8..54af807 100644
>>>>>> --- a/client/main.c
>>>>>> +++ b/client/main.c
>>>>>> @@ -1182,10 +1182,9 @@ static void rl_handler(char *input)
>>>>>> printf("Available commands:\n");
>>>>>>
>>>>>> for (i = 0; cmd_table[i].cmd; i++) {
>>>>>> - if (cmd_table[i].desc)
>>>>>> - printf("\t%s %s\t%s\n", cmd_table[i].cmd,
>>>>>> + printf("\t%s %s\t%s\n", cmd_table[i].cmd,
>>>>>> cmd_table[i].arg ? : " ",
>>>>>> - cmd_table[i].desc);
>>>>>> + cmd_table[i].desc ? : "");
>>>>>
>>>>>
>>>>> if I remember this correctly, then I was doing it to be able to hide
>>>>> commands from the help output. Mainly commands that are on purpose
>>>>> duplicates.
>>>>
>>>> So the right fix is to add the missing descriptions then? Lucas, can you
>>>> provide an updated patch that does this?
>>>
>>> actually I wanted to hide these commands on purpose.
>>
>> So you can't pair a device starting from remote using bluetoothctl on
>> purpose? Or is adding a description to at least "default-agent" ok?
>
> is this for the "default-agent" command? I forgot to add a description for that one?
Yes. I went with "show even if not description is available" because
it doesn't do any harm. I can add a description to default-agent
though
Lucas De Marchi
next prev parent reply other threads:[~2013-06-19 15:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 20:13 [PATCH BlueZ 1/5] build-sys: Don't build gdbus several times Lucas De Marchi
2013-06-18 20:13 ` [PATCH BlueZ 2/5] gitignore: Add missing tools Lucas De Marchi
2013-06-18 20:13 ` [PATCH BlueZ 3/5] adapter: Remove never used parameter Lucas De Marchi
2013-06-18 20:13 ` [PATCH BlueZ 4/5] client: Display command even with no description Lucas De Marchi
2013-06-19 5:08 ` Marcel Holtmann
2013-06-19 9:08 ` Johan Hedberg
2013-06-19 10:31 ` Marcel Holtmann
2013-06-19 13:40 ` Lucas De Marchi
2013-06-19 14:54 ` Marcel Holtmann
2013-06-19 15:02 ` Lucas De Marchi [this message]
2013-06-18 20:13 ` [PATCH BlueZ 5/5] client: prettify help table Lucas De Marchi
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='CAMOw1v5zqFEhjNZr3Cip==i6y2g8xka1FBuFua-7uG1h3AyMKw@mail.gmail.com' \
--to=lucas.demarchi@profusion.mobi \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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;
as well as URLs for NNTP newsgroup(s).