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()
|
_bluetooth_adresses()
|
||||||
{
|
{
|
||||||
if [ -n "${COMP_BLUETOOTH_SCAN:-}" ]; then
|
if [ -n "${COMP_BLUETOOTH_SCAN:-}" ]; then
|
||||||
COMPREPLY=( ${COMPREPLY[@]:-} $( hcitool scan | \
|
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool scan | \
|
||||||
awk '/^\t/{print $1}' | grep "^$cur" ) )
|
awk '/^\t/{print $1}' )" -- $cur ) )
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_bluetooth_devices()
|
_bluetooth_devices()
|
||||||
{
|
{
|
||||||
COMPREPLY=( ${COMPREPLY[@]:-} $( hcitool dev | \
|
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W "$( hcitool dev | \
|
||||||
awk '/^\t/{print $1}' | grep "^$cur" ) )
|
awk '/^\t/{print $1}' )" -- $cur ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
_bluetooth_services()
|
_bluetooth_services()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user