complete-ant-cmd.pl revision 5713
3832N/A# Licensed to the Apache Software Foundation (ASF) under one or more 3832N/A# contributor license agreements. See the NOTICE file distributed with 3832N/A# this work for additional information regarding copyright ownership. 3832N/A# The ASF licenses this file to You under the Apache License, Version 2.0 3832N/A# (the "License"); you may not use this file except in compliance with 3832N/A# the License. You may obtain a copy of the License at 3832N/A# Unless required by applicable law or agreed to in writing, software 3832N/A# distributed under the License is distributed on an "AS IS" BASIS, 3832N/A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3832N/A# See the License for the specific language governing permissions and 3832N/A# limitations under the License. 3832N/A# A script to allow Bash or Z-Shell to complete an Ant command-line. 3832N/A# To install for Bash 2.0 or better, add the following to ~/.bashrc: 3832N/A# $ complete -C complete-ant-cmd ant build.sh 3832N/A# To install for Z-Shell 2.5 or better, add the following to ~/.zshrc: 3832N/A# function ant_complete () { 3832N/A# set -A reply $(COMP_LINE=$args_line complete-ant-cmd ${args[1]} $1) 3832N/A# compctl -K ant_complete ant build.sh 3832N/A# @author Mike Williams <mikew@cortexebusiness.com.au> 4978N/A # Run "ant -projecthelp" to list targets. Keep a cache of results in a 4978N/A open(
HELP,
"$antCmd -projecthelp -f '$buildFile'|" ) ||
return();