From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Sven Guckes <guckes@math.fu-berlin.de>,
ZSH users mailing list <zsh-users@math.gatech.edu>
Subject: Re: 'man' completion
Date: Fri, 28 Aug 1998 10:58:19 -0700 [thread overview]
Message-ID: <980828105819.ZM7840@candle.brasslantern.com> (raw)
In-Reply-To: <19980828184231.N8118@math.fu-berlin.de>
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<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
next prev parent reply other threads:[~1998-08-28 18:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-26 15:42 Command alias in non-command position Andrej Borsenkow
1998-08-26 16:35 ` Bruce Stephens
1998-08-26 17:01 ` Zefram
1998-08-26 17:13 ` Bruce Stephens
1998-08-26 17:26 ` Andrej Borsenkow
1998-08-26 17:49 ` Bart Schaefer
1998-08-26 17:36 ` Bart Schaefer
1998-08-27 1:51 ` 'man' completion Gossamer
1998-08-27 9:14 ` Bruce Stephens
1998-08-27 17:09 ` Bart Schaefer
1998-08-28 16:42 ` Sven Guckes
1998-08-28 17:58 ` Bart Schaefer [this message]
1998-08-30 17:03 ` maillist archive lacking search engine Sven Guckes
1998-09-01 12:51 ` Command alias in non-command position Wayne Davison
1998-08-31 8:57 'man' completion Stephen Riehm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=980828105819.ZM7840@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=guckes@math.fu-berlin.de \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).