From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15429 invoked from network); 8 Feb 2003 19:45:07 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Feb 2003 19:45:07 -0000 Received: (qmail 8608 invoked by alias); 8 Feb 2003 19:44:50 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5900 Received: (qmail 8596 invoked from network); 8 Feb 2003 19:44:50 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 8 Feb 2003 19:44:49 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.46.181.248] by sunsite.dk (MessageWall 1.0.8) with SMTP; 8 Feb 2003 19:44:49 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h18JipQ27989 for zsh-users@sunsite.dk; Sat, 8 Feb 2003 11:44:51 -0800 From: "Bart Schaefer" Message-Id: <1030208194450.ZM27988@candle.brasslantern.com> Date: Sat, 8 Feb 2003 19:44:50 +0000 In-Reply-To: <8F6C90BF40FFD211948B0001FA7E51661288DF8F@xcem-casfo-13.wellsfargo.com> Comments: In reply to Eric.D.Friedman@WellsFargo.COM "completing a single clearcase command" (Feb 7, 1:32pm) References: <8F6C90BF40FFD211948B0001FA7E51661288DF8F@xcem-casfo-13.wellsfargo.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: completing a single clearcase command MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 7, 1:32pm, Eric.D.Friedman@WellsFargo.COM wrote: } } Like CVS, clearcase has a 2-level command system. The first command is } always "cleartool" (usually aliased to "ct"). The second is the real } operation you want to do. So, for example, "ct ls" does a cleartool } equivalent of ls. The most thorough examples of completion for this sort of command are Completion/Unix/Command/_cvs and Completion/Debian/Command/_apt. The former uses _arguments to parse the command line, and the latter uses _regex_arguments which allows more detailed pattern-matching but has a somewhat more tangled syntax. Which one is better depends on how complex the stuff between "ct" and the operation name may be. If there are never any arguments to "ct" before the operation name, look at Completion/Debian/Command/_bts. A less intense _regex_arguments example is Completion/X/Command/_xset. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net