From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7993 invoked from network); 24 Jan 1998 11:57:16 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 24 Jan 1998 11:57:16 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id GAA24909; Sat, 24 Jan 1998 06:36:33 -0500 (EST) Resent-Date: Sat, 24 Jan 1998 06:36:17 -0500 (EST) To: Thomas Köhler Cc: zsh-users@math.gatech.edu Subject: Re: man compctl References: <82hg6zowz8.fsf@y.idonex.se> <19980123222236.60814@picard.franken.de> X-Face: $$CzX_6%|HNr.oB"KTJp(4s)x@#{7`R#=qth)@YQVIW3G_vqiReP):T3il:o9H[)hjgs%QU z!Gx^:NL=B(KNK[Y7{`T*hok`uv`}ArWqZ\wF&KHgVYr+d\>oGI?I\60y?,j*xB@gkYk_)YU0]6"S` nEjNqCC Content-Type: TEXT/PLAIN; charset=ISO-8859-1 From: Mirar Date: 24 Jan 1998 12:37:54 +0100 In-Reply-To: Thomas Köhler's message of "Fri, 23 Jan 1998 22:22:36 +0100" Message-ID: <82n2gmt84t.fsf@skuld.idonex.se> X-Mailer: Gnus v5.4.66/Emacs 19.34 Resent-Message-ID: <"9jp2o.0.e46.m8Toq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1273 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > # completion for manpages I wrote one that demands kind-of fast computers, but i was lazy: #------------------------------------------------------------------------------ compctl -k "(- -a -d -F -l -r -t -M -T -s -k -f)" \ -K compmanfull \ -x "C[-1,-s^],s[-s]" -K compmansections \ - "R[-f,;]" -f \ - "R[-k,;]" -k "()" \ - "R[-s,;]" -K compmansection \ -- man compmanfull() { reply=(${^manpath}/man*/*(N:t:r)) } compmansections() { reply=( ${^manpath}/man*(N/) ) reply=( ${reply##*/man} ) } compmansection() { local a read -Ac a echo $a | sed -ne 's/^.* -s\([^ ]*\).*$/\1/p' | read prefix reply=(${^manpath}/man$prefix/*(N:t:r)) } #------------------------------------------------------------------------------