From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14658 invoked from network); 21 Jun 1999 07:14:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jun 1999 07:14:01 -0000 Received: (qmail 17292 invoked by alias); 21 Jun 1999 07:13:33 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2400 Received: (qmail 17284 invoked from network); 21 Jun 1999 07:13:32 -0000 Date: Mon, 21 Jun 1999 09:06:51 +0200 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: "Raju K. V." Cc: zsh-users@sunsite.auc.dk Subject: Re: completions for make targets? Message-ID: <19990621090651.B1131@picard.franken.de> Mail-Followup-To: "Raju K. V." , zsh-users@sunsite.auc.dk References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Raju K. V. on Mon, Jun 21, 1999 at 10:16:38AM +0530 X-Operating-System: Linux picard 2.2.10 X-Editor: VIM - Vi IMproved 5.4l ALPHA http://www.vim.org/ X-IRC: tirc-1.2; Nick: jeanluc X-URL: http://home.pages.de/~jeanluc/ Raju K. V. wrote: >=20 > Hi all, >=20 > 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 will list all > the targets for make. >=20 > 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 fi= le/d" -e "/^[^ #].*:/s/:.*//p"`' -x 'c[-1,-f]' -f - 'n[-1,=3D]' -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. :-) --=20 Thomas K=F6hler Email: jean-luc@picard.franken.de <>< WWW: http://home.pages.de/~jeanluc/ IRC: jeanluc LCARS --- Linux for Computers on All Real Starships