Split jar completion to contrib/jar
This commit is contained in:
parent
f844abd042
commit
7dbb6a2e3d
1
CHANGES
1
CHANGES
@ -19,6 +19,7 @@ bash-completion (1.x)
|
|||||||
* Split {update,invoke}-rc.d completions to contrib/sysv-rc
|
* Split {update,invoke}-rc.d completions to contrib/sysv-rc
|
||||||
* Don't install _subversion anymore
|
* Don't install _subversion anymore
|
||||||
* Split autorpm completion to contrib/autorpm
|
* Split autorpm completion to contrib/autorpm
|
||||||
|
* Split jar completion to contrib/jar
|
||||||
|
|
||||||
[ Ville Skyttä ]
|
[ Ville Skyttä ]
|
||||||
* Split yum and yum-arch completion into contrib/yum.
|
* Split yum and yum-arch completion into contrib/yum.
|
||||||
|
@ -41,6 +41,7 @@ bashcomp_DATA = contrib/ant \
|
|||||||
contrib/info \
|
contrib/info \
|
||||||
contrib/iptables \
|
contrib/iptables \
|
||||||
contrib/isql \
|
contrib/isql \
|
||||||
|
contrib/jar \
|
||||||
contrib/java \
|
contrib/java \
|
||||||
contrib/larch \
|
contrib/larch \
|
||||||
contrib/ldapvi \
|
contrib/ldapvi \
|
||||||
|
@ -2391,35 +2391,6 @@ _route()
|
|||||||
}
|
}
|
||||||
[ $UNAME = Linux ] && complete -F _route 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
|
# This meta-cd function observes the CDPATH variable, so that cd additionally
|
||||||
# completes on directories under those specified in CDPATH.
|
# completes on directories under those specified in CDPATH.
|
||||||
#
|
#
|
||||||
|
28
contrib/jar
Normal file
28
contrib/jar
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user