completion: add bluetoothctl zsh completions

System Internals / BlueZ - Ronan Pigott [berkeley.edu] - 6 September 2019 07:58 EDT

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 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

760640a04 completion: add bluetoothctl zsh completions
completion/zsh/_bluetoothctl | 98 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)

Upstream: git.kernel.org


  • Share