Red Hat Bugzilla – Bug 116961
command completion for make, ant
Last modified: 2007-11-30 17:10:37 EST
Description of problem:
I wrote a couple of shell functions to provide command completion for
ant and make. I've found them to be extremely useful, particularly
when dealing with third party stuff that I've downloaded. I guess I
should mention specifically that the completion works on build targets
found in build.xml for ant and Makefile for make.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Add ant_targets and make_targets functions to some shell init file
(e.g. /etc/profile, ~/.bashrc, ~/.functions, etc.).
2. Add 'complete ...' statements to shell init file to tell bash to
use the two functions named above for ant and make command completion.
Joy! Bash finds my targets for me.
I'm attaching a file in the next step with all the goodies. Hopefully.
Created attachment 98089 [details]
Gzipped shell script that contains the items necessary to implement this feature
This attachment contains:
- ant_targets -> bash shell function to find ant targets in build.xml
- make_targets -> bash shell function to find make targets in Makefile
- the two 'complete' statements necessary to instruct bash to use the above
There is a bash-completions project, which is probably a better place
for these. (And it's a really good idea by the way!)