From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1568 invoked from network); 13 Jun 1998 23:55:21 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 13 Jun 1998 23:55:21 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id TAA22862; Sat, 13 Jun 1998 19:48:19 -0400 (EDT) Resent-Date: Sat, 13 Jun 1998 19:46:29 -0400 (EDT) Message-ID: <19980614015032.30444@picard.franken.de> Date: Sun, 14 Jun 1998 01:50:32 +0200 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: zsh-users@math.gatech.edu Cc: =?iso-8859-1?Q?Johan_Sundstr=F6m?= , Sven Guckes Subject: Re: completion control for "man" command Mail-Followup-To: zsh-users@math.gatech.edu, =?iso-8859-1?Q?Johan_Sundstr=F6m?= , Sven Guckes References: <19980613204012.S3086@math.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Mailer: Mutt 0.89i In-Reply-To: <19980613204012.S3086@math.fu-berlin.de>; from Sven Guckes on Sat, Jun 13, 1998 at 08:40:12PM +0200 X-Disclaimer: Linux rulez X-Operating-System: Linux picard 2.0.32 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by math.gatech.edu id TAA22781 Resent-Message-ID: <"bC97b3.0.8a5.JzmWr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1611 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello, On Sat, Jun 13, 1998 at 08:40:12PM +0200, Sven Guckes wrote: > 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 [message on "how do I complete manpages?" deleted] I use the following for man completion. It uses a file ~/tmp/_man_ which stores the filenames in question. If you don't like your loginshell to wait for the creation of the file every now and then (I use 14 days) because it creates the _man_-file, just make a cronjob out of this... ------------------------------ snip ~/.zshrc ------------------------------ # completion for manpages # if ~/tmp/_man_ is too old then remove it and create a new one later find ~/tmp -mtime 14 -name "_man_" -exec rm -f {} \; createman () { echo "creating ~/tmp/_man_" # search the filenames which should be included later... find /usr/man -type f > ~/tmp/_man_ find /usr/local/man -type f >> ~/tmp/_man_ find /usr/X11R6/man -type f >> ~/tmp/_man_ # remove pathname, .gz-suffix and the section-number, use sort & uniq # to get an ordered list of filenames sed -e "s/.*\///" -e "s/\.gz//" -e "s/\.[^.]*$//" ~/tmp/_man_ | sort | uniq > ~/tmp/_man2_ rm -f ~/tmp/_man_ # put all on one line (for i in `cat ~/tmp/_man2_` ; do echo -n "$i " ; done) > ~/tmp/_man_ rm -f ~/tmp/_man2_ } # create ~/tmp/_man_ if [ ! -f ~/tmp/_man_ ] ; then createman ; fi # invoke compctl on file list man_pages=(`cat ~/tmp/_man_`) compctl -f -k man_pages man ------------------------------ snip ~/.zshrc ------------------------------ HTH, Thomas -- Thomas Köhler Email: jean-luc@picard.franken.de <>< WWW: http://home.pages.de/~jeanluc/ IRC: jeanluc LCARS --- Linux for Computers on All Real Starships