Use compgen -W instead of grepping $cur in bluez-utils.
This commit is contained in:
parent
9a7c9804f2
commit
0d78b4913f
@ -7,15 +7,15 @@ have hcitool && {
|
||||
_bluetooth_adresses()
|
||||
{
|
||||
if [ -n "${COMP_BLUETOOTH_SCAN:-}" ]; then
|
||||
COMPREPLY=( ${COMPREPLY[@]:-} $( hcitool scan | \
|
||||
awk '/^\t/{print $1}' | grep "^$cur" ) )
|
||||
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool scan | \
|
||||
awk '/^\t/{print $1}' )" -- $cur ) )
|
||||
fi
|
||||
}
|
||||
|
||||
_bluetooth_devices()
|
||||
{
|
||||
COMPREPLY=( ${COMPREPLY[@]:-} $( hcitool dev | \
|
||||
awk '/^\t/{print $1}' | grep "^$cur" ) )
|
||||
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool dev | \
|
||||
awk '/^\t/{print $1}' )" -- $cur ) )
|
||||
}
|
||||
|
||||
_bluetooth_services()
|
||||
|
Loading…
x
Reference in New Issue
Block a user