improved java completion
now suggests also package names
This commit is contained in:
parent
8227e76e09
commit
920b1f93b6
3
CHANGES
3
CHANGES
@ -18,6 +18,9 @@ bash-completion (2.x)
|
||||
* Improve __reassemble_comp_words_by_ref() to not create words of
|
||||
characters-to-exclude (Alioth: #313057)
|
||||
|
||||
[ Mattias Ulbrich ]
|
||||
* Make java class completion suggest packages.
|
||||
|
||||
-- David Paleino <d.paleino@gmail.com> Sun, 06 Feb 2011 21:46:37 +0100
|
||||
|
||||
bash-completion (1.3)
|
||||
|
@ -72,11 +72,11 @@ _java_classes()
|
||||
fi
|
||||
|
||||
elif [ -d $i ]; then
|
||||
# Intentionally looking for *.class only in $i (not subdirs),
|
||||
# see Debian bug #496828.
|
||||
compopt -o nospace
|
||||
COMPREPLY=( "${COMPREPLY[@]}"
|
||||
$( command ls $i/$cur*.class 2>/dev/null | \
|
||||
sed -ne '/\$/d' -e "s|^$i//*||p" ) )
|
||||
$( compgen -d -- $i/$cur | sed -e "s|^$i/\(.*\)|\1.|" )
|
||||
$( compgen -f -X '!*.class' -- $i/$cur | sed -e "s|^$i/||" )
|
||||
)
|
||||
|
||||
# FIXME: if we have foo.class and foo/, the completion
|
||||
# returns "foo/"... how to give precedence to files
|
||||
|
Loading…
x
Reference in New Issue
Block a user