[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 5b54c41de55300fb7c28b435b0e7a595ab1cd7d9
Ville Skyttä
ville.skytta at iki.fi
Tue Nov 3 20:49:40 UTC 2009
The following commit has been merged in the master branch:
commit 5b54c41de55300fb7c28b435b0e7a595ab1cd7d9
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue Nov 3 22:49:14 2009 +0200
Fix javadoc, lvm, and mkinitrd (_count_args) local variable leaks.
diff --git a/CHANGES b/CHANGES
index c4ecdf3..79cf995 100644
--- a/CHANGES
+++ b/CHANGES
@@ -38,6 +38,7 @@ bash-completion (2.x)
* Add /sbin to $PATH when invoking ifconfig and iwconfig.
* Combine dcop and qdbus completions into the latter.
* sed usage portability fixes.
+ * Fix leaking local variables from various completions.
[ Freddy Vulto ]
* Added _get_pword() helper function, thanks to Sung Pae (Alioth: #312030)
diff --git a/bash_completion b/bash_completion
index 8692c76..b23fde0 100644
--- a/bash_completion
+++ b/bash_completion
@@ -705,10 +705,11 @@ _realcommand() {
}
-# this function count the number of mandatory args
+# This function counts the number of args
#
_count_args()
{
+ local i
args=1
for (( i=1; i < COMP_CWORD; i++ )); do
if [[ "${COMP_WORDS[i]}" != -* ]]; then
diff --git a/contrib/java b/contrib/java
index d1fbdeb..01edc60 100644
--- a/contrib/java
+++ b/contrib/java
@@ -173,7 +173,7 @@ have javadoc &&
_javadoc()
{
COMPREPLY=()
- local cur prev
+ local cur prev classpath
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
diff --git a/contrib/lvm b/contrib/lvm
index 290c0a4..8f7da55 100644
--- a/contrib/lvm
+++ b/contrib/lvm
@@ -978,7 +978,7 @@ complete -F _lvextend lvextend
_lvm()
{
- local prev
+ local cur
COMPREPLY=()
cur=`_get_cword`
--
bash-completion
More information about the Bash-completion-commits
mailing list