Fix local variable leaks from bluez completions.
This commit is contained in:
parent
f1b4f1b982
commit
a47aff8481
1
CHANGES
1
CHANGES
@ -13,6 +13,7 @@ bash-completion (2.x)
|
||||
* Try both full path and basename completions for sudo etc (Alioth: #313065).
|
||||
* Don't install completions for init.d backup files.
|
||||
* Support tildes when recursively sourcing muttrc files (Debian: #615134).
|
||||
* Fix local variable leaks from bluez completions.
|
||||
|
||||
[ Guillaume Rousse ]
|
||||
* added puppet completion, using work from Mathieu Parent (sathieudebian.org)
|
||||
|
@ -55,6 +55,7 @@ _hcitool()
|
||||
|
||||
$split && return 0
|
||||
|
||||
local arg
|
||||
_get_first_arg
|
||||
if [ -z $arg ]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
@ -129,6 +130,7 @@ _sdptool()
|
||||
|
||||
$split && return 0
|
||||
|
||||
local arg
|
||||
_get_first_arg
|
||||
if [ -z $arg ]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
@ -213,6 +215,7 @@ _rfcomm()
|
||||
;;
|
||||
esac
|
||||
|
||||
local arg
|
||||
_get_first_arg
|
||||
if [ -z $arg ]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
@ -254,6 +257,7 @@ _ciptool()
|
||||
;;
|
||||
esac
|
||||
|
||||
local arg
|
||||
_get_first_arg
|
||||
if [ -z $arg ]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
@ -292,6 +296,7 @@ _dfutool()
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--help --device' -- "$cur" ) )
|
||||
else
|
||||
local args
|
||||
_count_args
|
||||
case $args in
|
||||
1)
|
||||
@ -313,6 +318,7 @@ _hciconfig()
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur
|
||||
|
||||
local arg
|
||||
_get_first_arg
|
||||
if [ -z $arg ]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
@ -362,6 +368,7 @@ _hciattach()
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '-n -p -t -b -s -l' -- "$cur" ) )
|
||||
else
|
||||
local args
|
||||
_count_args
|
||||
case $args in
|
||||
1)
|
||||
@ -413,6 +420,7 @@ _avctrl()
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--help --quiet' -- "$cur" ) )
|
||||
else
|
||||
local args
|
||||
_count_args
|
||||
if [ $args -eq 1 ]; then
|
||||
COMPREPLY=( $( compgen -W 'discover switch' -- "$cur" ) )
|
||||
|
1
test/completion/avctrl.exp
Normal file
1
test/completion/avctrl.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions avctrl
|
1
test/completion/ciptool.exp
Normal file
1
test/completion/ciptool.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions ciptool
|
1
test/completion/dfutool.exp
Normal file
1
test/completion/dfutool.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions dfutool
|
1
test/completion/hciattach.exp
Normal file
1
test/completion/hciattach.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions hciattach
|
1
test/completion/hciconfig.exp
Normal file
1
test/completion/hciconfig.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions hciconfig
|
1
test/completion/rfcomm.exp
Normal file
1
test/completion/rfcomm.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions rfcomm
|
1
test/completion/sdptool.exp
Normal file
1
test/completion/sdptool.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions sdptool
|
20
test/lib/completions/avctrl.exp
Normal file
20
test/lib/completions/avctrl.exp
Normal file
@ -0,0 +1,20 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "avctrl "
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
20
test/lib/completions/ciptool.exp
Normal file
20
test/lib/completions/ciptool.exp
Normal file
@ -0,0 +1,20 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "ciptool "
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
20
test/lib/completions/dfutool.exp
Normal file
20
test/lib/completions/dfutool.exp
Normal file
@ -0,0 +1,20 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "dfutool "
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
20
test/lib/completions/hciattach.exp
Normal file
20
test/lib/completions/hciattach.exp
Normal file
@ -0,0 +1,20 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "hciattach "
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
20
test/lib/completions/hciconfig.exp
Normal file
20
test/lib/completions/hciconfig.exp
Normal file
@ -0,0 +1,20 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "hciconfig "
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
20
test/lib/completions/rfcomm.exp
Normal file
20
test/lib/completions/rfcomm.exp
Normal file
@ -0,0 +1,20 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "rfcomm "
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
20
test/lib/completions/sdptool.exp
Normal file
20
test/lib/completions/sdptool.exp
Normal file
@ -0,0 +1,20 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "sdptool "
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
x
Reference in New Issue
Block a user