[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:05 UTC 2011
The following commit has been merged in the master branch:
commit a098290816c04032be64b445211e2e32696f48d3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Apr 27 16:00:51 2011 +0300
pack200, unpack200: Use _split_longopt.
diff --git a/CHANGES b/CHANGES
index ff7fb74..bcf6fca 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,8 +2,8 @@ bash-completion (2.x)
[ Ville Skyttä ]
* Add pxz and reptyr completions.
- * Improve aspell, gendiff, rsync, screen, smartctl, tar, xz, xzdec, and
- generic parsed and long option completions.
+ * Improve aspell, gendiff, pack200, rsync, screen, smartctl, tar, unpack200,
+ xz, xzdec, and generic parsed and long option completions.
* Try harder to find the correct perl executable to run the perl helper with.
* Drop rpm query support for rpm < 4.1.
* Split rpm and rpmbuild completions and improve them both.
diff --git a/completions/java b/completions/java
index 25bfa32..57b1787 100644
--- a/completions/java
+++ b/completions/java
@@ -320,7 +320,10 @@ have pack200 &&
_pack200()
{
local cur prev words cword
- _init_completion || return
+ _init_completion -n = || return
+
+ local split=false
+ _split_longopt && split=true
case $prev in
-S|--segment-limit|-P|--pass-file|-C|--class-attribute|\
@@ -359,6 +362,8 @@ _pack200()
;;
esac
+ $split && return
+
# Check if a pack or a jar was already given.
local i pack=false jar=false
for (( i=0; i < ${#words[@]}-1; i++ )) ; do
@@ -391,7 +396,10 @@ have unpack200 &&
_unpack200()
{
local cur prev words cword
- _init_completion || return
+ _init_completion -n = || return
+
+ local split=false
+ _split_longopt && split=true
case $prev in
'-?'|-h|--help|-V|--version|-J)
@@ -408,6 +416,8 @@ _unpack200()
;;
esac
+ $split && return
+
# Check if a pack or a jar was already given.
local i pack=false jar=false
for (( i=0; i < ${#words[@]}-1; i++ )) ; do
--
bash-completion
More information about the Bash-completion-commits
mailing list