completion: add bluetoothctl zsh completions
authorRonan Pigott <rpigott@berkeley.edu>
Sat, 17 Aug 2019 06:34:51 +0000 (23:34 -0700)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:59 +0000 (14:27 +0530)
commit6dd13aa32e5abc7125b16483e369908080fab326
treee989c76640a62ccde70f2412945d0fe58537e122
parentbe0c3ffe24a2d1c286fc6ce1da60d5ca95f1307b
completion: add bluetoothctl zsh completions

This zsh compdef provides completions for the bluetoothctl command.

It has been modified from version 1 of this patch to get the command
names and descriptions from the newly introduced --zsh-complete.

It utilizes the output of `bluetoothctl devices` or
`bluetoothctl controllers` to provide a descriptive completion menu
in those contexts.

e.g.

$ bluetoothctl connect <TAB>
04:52:C7:0C:D4:A7  -- Bose QuietComfort 35
40:4E:36:D9:8F:28  -- Pixel 2
A4:38:CC:20:5D:E0  -- Pro Controller

Change-Id: Ib06fa64d1cf86b6bc6439d6f99ef36d042ed3ec1
Signed-off-by: himanshu <h.himanshu@samsung.com>
completion/zsh/_bluetoothctl [new file with mode: 0644]