From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10308 invoked from network); 28 Aug 1998 18:11:10 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 28 Aug 1998 18:11:10 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA04648; Fri, 28 Aug 1998 13:57:45 -0400 (EDT) Resent-Date: Fri, 28 Aug 1998 13:57:21 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980828105819.ZM7840@candle.brasslantern.com> Date: Fri, 28 Aug 1998 10:58:19 -0700 In-Reply-To: <19980828184231.N8118@math.fu-berlin.de> Comments: In reply to Sven Guckes "Re: 'man' completion" (Aug 28, 6:42pm) References: <000a01bdd108$27f40910$21c9ca95@ao13.mow.sni.de> <980826103628.ZM21060@candle.brasslantern.com> <19980827115105.A13312@tertius.net.au> <980827100954.ZM2595@candle.brasslantern.com> <19980828184231.N8118@math.fu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sven Guckes , ZSH users mailing list Subject: Re: 'man' completion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"PFV0E2.0._71.0-kvr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1769 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 28, 6:42pm, Sven Guckes wrote: > Subject: Re: 'man' completion > > Quoting Bart Schaefer (schaefer@brasslantern.com): > > The only missing bit being that if you want to use the section > > number to restrict the search (i.e. "man 5 x" completes only > > to "xferlog" and not to "xterm" etc.), then you need a function. > > Such as? ;-) Uhh, such as function complete_man_in_section { emulate -R zsh setopt localoptions nullglob local args read -Ac args args=(${args:#-*}) # Delete all words beginning with "-" reply=(${(s(:))^MANPATH}/man$args[2]/*.([1-9nlo]|[1-9](|[a-z]))(:t:r)) } > I presume there must be some non-plus-ultra completion control for "man". > But which *is* the best? > > Sven [hoping to see more of this on this maillist] There have been more different "man" completions posted to zsh mailing lists than any other sample completion. Look through the archives on www.zsh.org. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com