From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11366 invoked from network); 27 Aug 1998 01:55:16 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 27 Aug 1998 01:55:16 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id VAA25991; Wed, 26 Aug 1998 21:49:22 -0400 (EDT) Resent-Date: Wed, 26 Aug 1998 21:49:08 -0400 (EDT) Message-ID: <19980827115105.A13312@tertius.net.au> Date: Thu, 27 Aug 1998 11:51:05 +1000 From: Gossamer To: ZSH users mailing list Subject: 'man' completion References: <000a01bdd108$27f40910$21c9ca95@ao13.mow.sni.de> <980826103628.ZM21060@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93i In-Reply-To: <980826103628.ZM21060@candle.brasslantern.com>; from Bart Schaefer on Wed, Aug 26, 1998 at 10:36:27AM -0700 X-Religion: linux slrn mutt vim Resent-Message-ID: <"8LYco1.0.eL6.KiBvr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1765 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I have a nifty set of completion macros for man pages but unfortunately they stop me from getting the filename completion when I'm specifying the file directly, eg: man ./goofey.1 Forget where I got the original manpage macros from, this is it ... # man: complete commands, otherwise complete by search of $MANPATH. # This is placed as an all-encompassing pattern at the end because # making it the default before the -x doesn't work. (It becomes # '-c + (-K 'match-man' -x ...), not (-c + -K 'match-man') -x ...). # We also complete paths for -M (override manpath), commands for # -P (pager) and disable for -S (search sections). After an explicit # number (which it helps to complete for you), these completion rules # assume a thorough search is needed and no longer uses the '-c' hashed # commands, relying entirely on what's really in the manpath. compctl -x 'S[1][2][3][4][5][6][7][8][9]' -k '(1 2 3 4 5 6 7 8 9)' \ - 'R[[1-9nlo]|[1-9](|[a-z]),^*]' -K 'match-man' \ - 's[-M],c[-1,-M]' -g '*(-/)' \ - 's[-P],c[-1,-P]' -c \ - 's[-S],s[-1,-S]' -k '( )' \ - 's[-]' -k '(a d f h k t M P)' \ - 'p[1,-1]' -c + -K 'match-man' \ -- man Gossamer -- : Gossamer gossamer@tertius.net.au | Xanadoodler : http://www.tertius.net.au/~gossamer/ | And proud of it :) : Non-cooperation with evil is as much a duty as cooperation with good. : -- Mohandas Gandhi