[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-62-gf0eac44

Ville Skyttä ville.skytta at iki.fi
Wed Apr 6 15:51:36 UTC 2011


The following commit has been merged in the master branch:
commit 823f63455113bd07539d82fb5eafee3e14019cbc
Author: Mattias Ulbrich <ulbrich at kit.edu>
Date:   Wed Apr 6 14:12:37 2011 +0200

    repaired sourcepath and classpath lookup
    
    did not work correctly if multiple paths were given (using :)
    now takes the corrected information

diff --git a/completions/java b/completions/java
index 73a8890..a98d8db 100644
--- a/completions/java
+++ b/completions/java
@@ -15,9 +15,9 @@ _java_find_classpath()
     local i
 
     # search first in current options
-    for (( i=1; i < COMP_CWORD; i++ )); do
-        if [[ "${COMP_WORDS[i]}" == -@(cp|classpath) ]]; then
-            classpath=${COMP_WORDS[i+1]}
+    for (( i=1; i < cword; i++ )); do
+        if [[ "${words[i]}" == -@(cp|classpath) ]]; then
+            classpath=${words[i+1]}
             break
         fi
     done
@@ -35,9 +35,9 @@ _java_find_sourcepath()
     local i
 
     # search first in current options
-    for (( i=1; i < COMP_CWORD; i++ )); do
-        if [[ "${COMP_WORDS[i]}" == -sourcepath ]]; then
-            sourcepath=${COMP_WORDS[i+1]}
+    for (( i=1; i < cword; i++ )); do
+        if [[ "${words[i]}" == -sourcepath ]]; then
+            sourcepath=${words[i+1]}
             break
         fi
     done

-- 
bash-completion



More information about the Bash-completion-commits mailing list