[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-135-g3a39ac6

Ville Skyttä ville.skytta at iki.fi
Wed Apr 27 15:42:04 UTC 2011


The following commit has been merged in the master branch:
commit f65dffd4f6724844c495dd64b2ddc34054f080e2
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Apr 27 15:51:19 2011 +0300

    _java_classes: Drop unnecessary nospace toggling.

diff --git a/completions/java b/completions/java
index f167be8..25bfa32 100644
--- a/completions/java
+++ b/completions/java
@@ -72,13 +72,12 @@ _java_classes()
             fi
 
         elif [ -d $i ]; then
-            compopt -o nospace &>/dev/null
             COMPREPLY+=(
                 $( compgen -d -- "$i/$cur" | sed -e "s|^$i/\(.*\)|\1.|" )
                 $( compgen -f -X '!*.class' -- "$i/$cur" | \
                     sed -e '/\$/d' -e "s|^$i/||" )
             )
-            [[ $COMPREPLY == *.class ]] && compopt +o nospace &>/dev/null
+            [[ $COMPREPLY == *.class ]] || compopt -o nospace &>/dev/null
 
             # FIXME: if we have foo.class and foo/, the completion
             # returns "foo/"... how to give precedence to files

-- 
bash-completion



More information about the Bash-completion-commits mailing list