[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 7dbb6a2e3da2f7f4d753a5870d114f6a9fa315d4
David Paleino
d.paleino at gmail.com
Fri Jun 5 06:34:08 UTC 2009
The following commit has been merged in the master branch:
commit 7dbb6a2e3da2f7f4d753a5870d114f6a9fa315d4
Author: David Paleino <d.paleino at gmail.com>
Date: Fri Jun 5 08:33:55 2009 +0200
Split jar completion to contrib/jar
diff --git a/CHANGES b/CHANGES
index 0eaad69..885a4e8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,6 +19,7 @@ bash-completion (1.x)
* Split {update,invoke}-rc.d completions to contrib/sysv-rc
* Don't install _subversion anymore
* Split autorpm completion to contrib/autorpm
+ * Split jar completion to contrib/jar
[ Ville Skyttä ]
* Split yum and yum-arch completion into contrib/yum.
diff --git a/Makefile.am b/Makefile.am
index beddea0..fa03f99 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,6 +41,7 @@ bashcomp_DATA = contrib/ant \
contrib/info \
contrib/iptables \
contrib/isql \
+ contrib/jar \
contrib/java \
contrib/larch \
contrib/ldapvi \
diff --git a/bash_completion b/bash_completion
index 20ed34f..cce580c 100644
--- a/bash_completion
+++ b/bash_completion
@@ -2391,35 +2391,6 @@ _route()
}
[ $UNAME = Linux ] && complete -F _route route
-# jar(1) completion
-#
-have jar &&
-_jar()
-{
- local cur
-
- COMPREPLY=()
- cur=`_get_cword`
-
- if [ $COMP_CWORD = 1 ]; then
- COMPREPLY=( $( compgen -W 'c t x u' -- $cur ) )
- return 0
- fi
-
- case "${COMP_WORDS[1]}" in
- *c*f)
- _filedir
- ;;
- *f)
- _filedir '?([ejw]ar|zip|[EJW]AR|ZIP)'
- ;;
- *)
- _filedir
- ;;
- esac
-} &&
-complete -F _jar $filenames jar
-
# This meta-cd function observes the CDPATH variable, so that cd additionally
# completes on directories under those specified in CDPATH.
#
diff --git a/contrib/jar b/contrib/jar
new file mode 100644
index 0000000..fdab39c
--- /dev/null
+++ b/contrib/jar
@@ -0,0 +1,28 @@
+# jar(1) completion
+#
+have jar &&
+_jar()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD = 1 ]; then
+ COMPREPLY=( $( compgen -W 'c t x u' -- $cur ) )
+ return 0
+ fi
+
+ case "${COMP_WORDS[1]}" in
+ *c*f)
+ _filedir
+ ;;
+ *f)
+ _filedir '?([ejw]ar|zip|[EJW]AR|ZIP)'
+ ;;
+ *)
+ _filedir
+ ;;
+ esac
+} &&
+complete -F _jar $filenames jar
--
bash-completion
More information about the Bash-completion-commits
mailing list