zsh-users
 help / color / mirror / code / Atom feed
* completion control for "man" command
@ 1998-06-13 18:40 Sven Guckes
  1998-06-13 23:50 ` Thomas Köhler
  1998-06-14  0:29 ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Sven Guckes @ 1998-06-13 18:40 UTC (permalink / raw)
  To: zsh-users; +Cc: Johan Sundström

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 -----


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-06-15  9:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-13 18:40 completion control for "man" command Sven Guckes
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

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).