zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Cc: Jukka Lehti <jukkalehti@yahoo.com>
Subject: man page completion (was Re: Few newbie questions..)
Date: Tue, 21 Aug 2001 11:08:57 +0100	[thread overview]
Message-ID: <3B823339.BFD4B63C@yahoo.co.uk> (raw)
In-Reply-To: <20010817173924.73063.qmail@web20304.mail.yahoo.com>

Jukka Lehti wrote:
> 
> When I type for example 'man local' and hit tab
> I can choose from:
> 
> locale.1 locale.3 locale.7
> 
> I prefer the man completion to show me the section
> numbers (although I have remove the number before
> pressing enter since man can't find e.g. locale.1).

Having the section number visible is a useful idea which I'd also like.
Putting it in the actual match is not ideal though. It would be better
to have the section number in a description or to group different
sections separately under different headings.

I expect some people would prefer not to have this separate grouping.
`zstyle ':completion:*:man.*' group-name manual' might group them all
together but you would then still get separate headings for each group
and I'm not sure if it is possible to replace them with one. It would
also allow other things like use of the tag-order style.

To get this working, it needs something like this:
  sects=( ${pages:e} )
  typeset -U $sects
  for sect in $sects; do
    _wanted "man.$sect" expl "manual page, section $sect" \
        compadd "$@" - ${${(M)pages:#*.${sect}}%.(?|<->*)}
  done

Bart Wrote:
> On Aug 18, 11:00pm, Peter Stephenson wrote:
> } Probably _man_pages and a few others should get the treatment meted out
> } to helper functions in _cvs, namely defining the function only if
> } $functions[_man_pages] is not defined.
> 
> Actually, I don't like the treatment of the functions in _cvs.  It makes
> it very difficult to reload the entire file, which I have occasionally
> wanted to do.

Yes, it can be a nuisance to reload the completion functions which
define other functions. I don't see why it is necessary with _man as
_man_pages is called once, as the last line in _man. The _wanted could
be used directly on compadd.

Oliver

_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp


       reply	other threads:[~2001-08-21 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010817173924.73063.qmail@web20304.mail.yahoo.com>
2001-08-21 10:08 ` Oliver Kiddle [this message]
2002-01-10 10:56   ` Sven Wischnowsky

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=3B823339.BFD4B63C@yahoo.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=jukkalehti@yahoo.com \
    --cc=zsh-workers@sunsite.dk \
    /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).