summaryrefslogtreecommitdiff
path: root/completions/java
diff options
context:
space:
mode:
Diffstat (limited to 'completions/java')
-rw-r--r--completions/java10
1 files changed, 5 insertions, 5 deletions
diff --git a/completions/java b/completions/java
index e02f7369..c302d1e5 100644
--- a/completions/java
+++ b/completions/java
@@ -21,10 +21,10 @@ _java_find_classpath()
done
# default to environment
- [ -z "$classpath" ] && classpath=$CLASSPATH
+ [[ -z $classpath ]] && classpath=$CLASSPATH
# default to current directory
- [ -z "$classpath" ] && classpath=.
+ [[ -z $classpath ]] && classpath=.
}
# exact sourcepath determination
@@ -41,7 +41,7 @@ _java_find_sourcepath()
done
# default to classpath
- if [ -z "$sourcepath" ]; then
+ if [[ -z $sourcepath ]]; then
local classpath
_java_find_classpath
sourcepath=$classpath
@@ -69,7 +69,7 @@ _java_classes()
command grep '^[^$]*\.class$' ) )
fi
- elif [ -d $i ]; then
+ elif [[ -d $i ]]; then
COMPREPLY+=(
$( compgen -d -- "$i/$cur" | sed -e "s|^$i/\(.*\)|\1.|" )
$( compgen -f -X '!*.class' -- "$i/$cur" | \
@@ -101,7 +101,7 @@ _java_packages()
cur=${cur//.//}
# parse each sourcepath element for packages
for i in ${sourcepath//:/ }; do
- if [ -d $i ]; then
+ if [[ -d $i ]]; then
COMPREPLY+=( $( command ls -F -d $i/$cur* 2>/dev/null | \
sed -e 's|^'$i'/||' ) )
fi