PR: MPSHELL-1

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@190086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett committed 2005-06-11 06:55:23 +00:00
1 parent ecc2cd9e42
commit 155506715e
4 files changed
+68 -3

No files matched your search

+3
View File
@@ -24,6 +24,9 @@
<author email="apache@kav.dk">Kasper Nielsen</author>
</properties>
<body>
<release version="1.2-SNAPSHOT" date="in SVN">
<action dev="brett" type="update" due-to="Michael Schuerig" issue="MPSHELL-1">Bash completion support</action>
</release>
<release version="1.1" date="2004-03-10">
<action dev="dion" type="fix">Apply MAVEN-850</action>
</release>
+40 -2
View File
@@ -25,10 +25,10 @@
</properties>
<body>
<section name="Maven Eclipse Plugin">
<section name="Maven Shell Plugin">
<p>
This plug-in provides the ability to generate shell script files
that allows for tab completion.
that allows for tab completion.
</p>
<p>
For more information on the functionality provided by this plugin,
@@ -39,6 +39,44 @@
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>