Files
maven-plugins/shell/xdocs/index.xml
T
2005-06-11 06:55:23 +00:00

83 lines
2.4 KiB
XML

<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Maven Shell Plugin</title>
<author email="apache@kav.dk">Kasper Nielsen</author>
</properties>
<body>
<section name="Maven Shell Plugin">
<p>
This plug-in provides the ability to generate shell script files
that allows for tab completion.
</p>
<p>
For more information on the functionality provided by this plugin,
please see the <a href="goals.html">Goals</a> document.
</p>
<p>
For more information on how to customise the functionality provided
by this plugin, please see the <a href="properties.html">properties</a>
document.
</p>
<subsection name="Bash Completion">
<p>
You must add this to your <code>bash_completion.d</code> directory:
</p>
<source><![CDATA[
have maven &&
_maven() {
cf=target/maven_goals.bash
cur=${COMP_WORDS[$COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
-D|--define|-d|--dir|-f|--find|-p|--pom)
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W '--debug --define --dir --emacs \
--exception --find --goals --help --info --nobanner \
--offline --plugin-help --pom --quiet --usage --version \
-D -E -P -X -b -d -e -f -g -h -i -o -p -q -u -v' -- $cur) )
return 0
fi
if [ ! -r "$cf" ] ; then
echo
echo "# The bash completion file does not exist or is not readable"
echo "# Please generate it with maven shell:bash"
return 0
fi
COMPREPLY=( $( cat "$cf" | grep "^$cur" ) )
}
[ "$have" ] && complete -F _maven maven
]]></source>
</subsection>
</section>
</body>
</document>