Fix leak of $arg from hcitool and cryptsetup completions.
This commit is contained in:
parent
1017a085a9
commit
38e9ef18b2
@ -30,7 +30,7 @@ _bluetooth_packet_types()
|
|||||||
|
|
||||||
_hcitool()
|
_hcitool()
|
||||||
{
|
{
|
||||||
local cur prev split=false
|
local cur prev split=false arg
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
|
@ -15,7 +15,7 @@ _cryptsetup_device()
|
|||||||
have cryptsetup &&
|
have cryptsetup &&
|
||||||
_cryptsetup()
|
_cryptsetup()
|
||||||
{
|
{
|
||||||
local cur prev
|
local cur prev arg
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=`_get_cword`
|
cur=`_get_cword`
|
||||||
prev=`_get_pword`
|
prev=`_get_pword`
|
||||||
|
1
test/completion/cryptsetup.exp
Normal file
1
test/completion/cryptsetup.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions cryptsetup
|
1
test/completion/hcitool.exp
Normal file
1
test/completion/hcitool.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions hcitool
|
20
test/lib/completions/cryptsetup.exp
Normal file
20
test/lib/completions/cryptsetup.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}; # setup()
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}; # teardown()
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "cryptsetup "
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
20
test/lib/completions/hcitool.exp
Normal file
20
test/lib/completions/hcitool.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}; # setup()
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}; # teardown()
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "hcitool "
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user