From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29704 invoked from network); 13 Jun 1998 18:56:19 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 13 Jun 1998 18:56:19 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id OAA15875; Sat, 13 Jun 1998 14:39:23 -0400 (EDT) Resent-Date: Sat, 13 Jun 1998 14:39:11 -0400 (EDT) Message-ID: <19980613204012.S3086@math.fu-berlin.de> Date: Sat, 13 Jun 1998 20:40:12 +0200 From: Sven Guckes To: zsh-users@math.gatech.edu Cc: =?iso-8859-1?Q?Johan_Sundstr=F6m?= Subject: completion control for "man" command Mail-Followup-To: zsh-users@math.gatech.edu, =?iso-8859-1?Q?Johan_Sundstr=F6m?= Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.92.8i X-Mailer-Info: http://www.math.fu-berlin.de/~guckes/mutt/ Resent-Message-ID: <"_JufA.0.Vt3.DTiWr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1604 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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 ----- From: "Johan Sundström" To: "Sven Guckes" 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 -----