[Bash-completion-devel] [bash-completion-Bugs][311415] DBTS 266967: tab completion for make with implicit rules

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Fri Jan 30 09:34:49 UTC 2009


Bugs item #311415, was opened at 30/01/2009 10:34
Status: Open
Priority: 2
Submitted By: David Paleino (hanska-guest)
Assigned to: Nobody (None)
Summary: DBTS 266967: tab completion for make with implicit rules 
Distribution: None
Originally reported in: Debian BTS
Milestone: None
Original bug number: 266967


Initial Comment:
From: Brian Minton <bminton at ac-tech.com>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: bash: tab completion for make with implicit rules
Date: Thu, 19 Aug 2004 17:56:49 -0400

Package: bash
Version: 3.0-5
Severity: wishlist

I made a makefile with some implicit rules, but I can't
tab-complete filenames to match it.  Here is the makefile (4
lines long):

%.html : %.txt
	pdbtxt2html $< $@
%.txt : %.pdb
	txt2pdbdoc -d $< $@

So for instance, if I have a file called foo.pdb, and I type:
    make foo.html
I will see the following results:

txt2pdbdoc -d foo.pdb foo.txt
pdbtxt2html foo.txt foo.html
rm foo.txt

I would like to be able to do:

    make fo<tab>

and see as the possible completions (assuming no other files
starting with 'fo'):

foo.txt foo.html

Built-in implicit rule completion would be nice as well.  For
instance, having a file called foo.c laying around, I do:

    make fo<tab>

and see the following possible completions (again, assuming no
other files starting with 'fo' exist): 

foo foo.o

While I am wishing, also completing standard makefile variables
would be nice too, like so:

    make foo CFL<tab>

would expand to CFLAGS= and then possibly show some of the
compiler options by using the cc completions.  Similarly, 
    
    make foo LDF<tab>

would expand to LDFLAGS= and possibly show some libraries in the
library path.

thanks,
Brian Minton


----------------------------------------------------------------------

You can respond by visiting: 
http://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311415&group_id=100114



More information about the Bash-completion-devel mailing list