[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-76-ga47aff8
Ville Skyttä
ville.skytta at iki.fi
Sun Apr 17 10:44:37 UTC 2011
The following commit has been merged in the master branch:
commit a47aff84810cacf6d5d6ea0f62f79727a414ca17
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Apr 17 13:44:06 2011 +0300
Fix local variable leaks from bluez completions.
diff --git a/CHANGES b/CHANGES
index e7f6a15..4dfb375 100644
--- a/CHANGES
+++ b/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)
diff --git a/completions/bluez b/completions/bluez
index 4b494d3..3a3a5ec 100644
--- a/completions/bluez
+++ b/completions/bluez
@@ -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" ) )
diff --git a/test/completion/avctrl.exp b/test/completion/avctrl.exp
new file mode 100644
index 0000000..ea323c5
--- /dev/null
+++ b/test/completion/avctrl.exp
@@ -0,0 +1 @@
+assert_source_completions avctrl
diff --git a/test/completion/ciptool.exp b/test/completion/ciptool.exp
new file mode 100644
index 0000000..206f21c
--- /dev/null
+++ b/test/completion/ciptool.exp
@@ -0,0 +1 @@
+assert_source_completions ciptool
diff --git a/test/completion/dfutool.exp b/test/completion/dfutool.exp
new file mode 100644
index 0000000..0859f07
--- /dev/null
+++ b/test/completion/dfutool.exp
@@ -0,0 +1 @@
+assert_source_completions dfutool
diff --git a/test/completion/hciattach.exp b/test/completion/hciattach.exp
new file mode 100644
index 0000000..f85a355
--- /dev/null
+++ b/test/completion/hciattach.exp
@@ -0,0 +1 @@
+assert_source_completions hciattach
diff --git a/test/completion/hciconfig.exp b/test/completion/hciconfig.exp
new file mode 100644
index 0000000..5f10995
--- /dev/null
+++ b/test/completion/hciconfig.exp
@@ -0,0 +1 @@
+assert_source_completions hciconfig
diff --git a/test/completion/rfcomm.exp b/test/completion/rfcomm.exp
new file mode 100644
index 0000000..6de31dc
--- /dev/null
+++ b/test/completion/rfcomm.exp
@@ -0,0 +1 @@
+assert_source_completions rfcomm
diff --git a/test/completion/sdptool.exp b/test/completion/sdptool.exp
new file mode 100644
index 0000000..6d20cf9
--- /dev/null
+++ b/test/completion/sdptool.exp
@@ -0,0 +1 @@
+assert_source_completions sdptool
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/avctrl.exp
similarity index 79%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/avctrl.exp
index 77cd07f..6ca9de7 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/avctrl.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "avctrl "
sync_after_int
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/ciptool.exp
similarity index 79%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/ciptool.exp
index 77cd07f..cefe8f9 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/ciptool.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "ciptool "
sync_after_int
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/dfutool.exp
similarity index 79%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/dfutool.exp
index 77cd07f..10e4854 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/dfutool.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "dfutool "
sync_after_int
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/hciattach.exp
similarity index 78%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/hciattach.exp
index 77cd07f..35642f2 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/hciattach.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "hciattach "
sync_after_int
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/hciconfig.exp
similarity index 78%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/hciconfig.exp
index 77cd07f..56444f4 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/hciconfig.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "hciconfig "
sync_after_int
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/rfcomm.exp
similarity index 79%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/rfcomm.exp
index 77cd07f..b449134 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/rfcomm.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "rfcomm "
sync_after_int
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/sdptool.exp
similarity index 79%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/sdptool.exp
index 77cd07f..c46a1fa 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/sdptool.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "sdptool "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list