Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 'man' completion
- X-seq: zsh-users 1769
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Sven Guckes <guckes@xxxxxxxxxxxxxxxxx>, ZSH users mailing list <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: 'man' completion
- Date: Fri, 28 Aug 1998 10:58:19 -0700
- In-reply-to: <19980828184231.N8118@xxxxxxxxxxxxxxxxx>
- References: <000a01bdd108$27f40910$21c9ca95@xxxxxxxxxxxxxxx> <vbk93v8zwm.fsf@xxxxxxxxxxxxxxx> <980826103628.ZM21060@xxxxxxxxxxxxxxxxxxxxxxx> <19980827115105.A13312@xxxxxxxxxxxxxx> <vbyasahjmt.fsf@xxxxxxxxxxxxxxx> <980827100954.ZM2595@xxxxxxxxxxxxxxxxxxxxxxx> <19980828184231.N8118@xxxxxxxxxxxxxxxxx>
On Aug 28, 6:42pm, Sven Guckes wrote:
> Subject: Re: 'man' completion
>
> Quoting Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx):
> > The only missing bit being that if you want to use the section
> > number to restrict the search (i.e. "man 5 x<TAB>" 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author