client/main: add help option for available args
authorRonan Pigott <rpigott@berkeley.edu>
Sat, 17 Aug 2019 06:34:49 +0000 (23:34 -0700)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:47 +0000 (14:27 +0530)
commitaefa8a60f23ebe5d6baafd782f30a5c2e07c6ed8
tree437c8aa3d4ee48dd0b63a5ff3b404ff29d033806
parentf9891548cbf0230674a2704e91fd749bf5f0aa73
client/main: add help option for available args

This option exists to facilitate external completion of commands that
have specially defined arguments. It effectively adds two new commands
to bluetoothctl with the following output:

$ bluetoothctl agent help
on
off
DisplayOnly
DisplayYesNo
KeyboardDisplay
KeyboardOnly
NoInputNoOutput

$ bluetoothctl advertise help
on
off
peripheral
broadcast

Shell completion scripts can then parse this output to provide
completions for those commands.

Change-Id: Ia431ea11d7a1cb344b512f0180bd0ebac0754567
Signed-off-by: himanshu <h.himanshu@samsung.com>
client/main.c