zsh-users
 help / color / mirror / code / Atom feed
From: Sven Guckes <guckes@math.fu-berlin.de>
To: zsh-users@math.gatech.edu
Cc: "Johan Sundström" <johsu650@student.liu.se>
Subject: completion control for "man" command
Date: Sat, 13 Jun 1998 20:40:12 +0200	[thread overview]
Message-ID: <19980613204012.S3086@math.fu-berlin.de> (raw)

Hey!

Rather than keeping this mail to myself and trying the impossible [;-)] I'll
forward this to the experts on the zsh-users mailist. Hope you don't mind.
(And I hope it answers your question on a "public forum" for zsh, Johan. :-)

I wonder - hasn't the completion control for manuals been perfected by now?

Sven

----- Forwarded message from Johan Sundström <johsu650@student.liu.se> -----

From: "Johan Sundström" <johsu650@student.liu.se>
To: "Sven Guckes" <guckes@math.fu-berlin.de>
Subject: Compctl ... -- man
Date: Sat, 13 Jun 1998 20:06:28 +0200
X-Mailer: Microsoft Outlook Express 4.72.3110.1

I've been trying to fix a pleasant completion behaviour for the "man"
command, looking at files in the directories named in the vector $manpath,
in the order they are presented there. I guess I should build some
intelligent for structure that traverses the array and builds up some
intricate compctl commandline that is finally executed, but I'm not sure how
it should be accomplished. Could the -g globbing be used in some clever way?
We're looking at matching files matching a given pattern in a set of
directories, cutting out just a part of the filename path (something like
'(:t:r)' in my figlet setup, although not only cutting away the last
extension but all present; turning "/usr/man/man1/zshcompctl.1.gz" to
"zshcompctl").

Maybe I'm seriously overambitious about this one, but it would be *very*
convenient to have completion for the man command. Perhaps it will take a
bit too long to dive through all these directories everytime the completion
is executed, and thus should be done initially, from .zshrc? Any suggestions
on how to accomplish this?

Is there a public forum somewhere (on the web?), where people announce their
clever compctl completions and similar clever zsh tricks? It would do a
great deal to help newcomers learn and other benefit from eachothers ideas
and cleverness/laziness. :) I've just recently started to learn the sheer
potential for the command, and I can frankly say that I'm amazed. I played
around for a while, and ended up with a cute figlet completion:

compctl -x 'C[-1,-f]' -g '/usr/share/figlet/*.flf(:t:r)' - 'C[-1,-d]' -g
'*(/)' -- figlet

(Sure, it's not perfect; there's no clever -C parameter completion
behaviour, but hey, I'm just a newbie :-)

/Johan Sundström, happy Red Hat Linux user

----- End forwarded message -----


             reply	other threads:[~1998-06-13 18:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-13 18:40 Sven Guckes [this message]
1998-06-13 23:50 ` Thomas Köhler
1998-06-15  0:18   ` Sven Guckes
1998-06-15  1:36     ` Bart Schaefer
1998-06-15  8:54     ` Thomas Koehler
1998-06-14  0:29 ` Bart Schaefer

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=19980613204012.S3086@math.fu-berlin.de \
    --to=guckes@math.fu-berlin.de \
    --cc=johsu650@student.liu.se \
    --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).