Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completions for make targets?
- X-seq: zsh-users 2400
- From: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- To: "Raju K. V." <rajukv@xxxxxxxxxxxxxxxx>
- Subject: Re: completions for make targets?
- Date: Mon, 21 Jun 1999 09:06:51 +0200
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <Pine.SV4.3.93.990621101124.5328A-100000@tagore>; from Raju K. V. on Mon, Jun 21, 1999 at 10:16:38AM +0530
- Mail-followup-to: "Raju K. V." <rajukv@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <Pine.SV4.3.93.990621101124.5328A-100000@tagore>
Raju K. V. <rajukv@xxxxxxxxxxxxxxxx> wrote:
>
> Hi all,
>
> I am a zsh newbie still struggling to understand the power of compctl. I
> have one requirement. How can I use compctl to complate make targets? I
> can illustrate my requirements:
> suppose I have 'Makefile' in my current directory with targets
> xx:
> yy:
> zz:
> clean:
> clobber:
> now I want to program compctl in such a way that $make <TAB> will list all
> the targets for make.
>
> Any help will be welcome.
Well, there is a tool to convert tcsh complete commands to zsh compctl
statements. Using that, I got this solution (sorry for the *long* line):
compctl -s '`cat -s GNUmakefile Makefile makefile |& sed -n -e "/No such file/d" -e "/^[^ #].*:/s/:.*//p"`' -x 'c[-1,-f]' -f - 'n[-1,=]' -f -- make
> Thanks and regards,
> Raju
HTH,
Thomas
> p.s.: Since I am not subscribed to the list, please CC me in your replies.
No problem. :-)
--
Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx
<>< WWW: http://home.pages.de/~jeanluc/
IRC: jeanluc
LCARS --- Linux for Computers on All Real Starships
Messages sorted by:
Reverse Date,
Date,
Thread,
Author