Fix leak of $arg from hcitool and cryptsetup completions.

This commit is contained in:
Ville Skyttä 2010-04-21 19:25:02 +03:00
parent 1017a085a9
commit 38e9ef18b2
6 changed files with 44 additions and 2 deletions

View File

@ -30,7 +30,7 @@ _bluetooth_packet_types()
_hcitool()
{
local cur prev split=false
local cur prev split=false arg
COMPREPLY=()
cur=`_get_cword`

View File

@ -15,7 +15,7 @@ _cryptsetup_device()
have cryptsetup &&
_cryptsetup()
{
local cur prev
local cur prev arg
COMPREPLY=()
cur=`_get_cword`
prev=`_get_pword`

View File

@ -0,0 +1 @@
assert_source_completions cryptsetup

View File

@ -0,0 +1 @@
assert_source_completions hcitool

View 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

View 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