From: Gossamer <gossamer@tertius.net.au>
To: ZSH users mailing list <zsh-users@math.gatech.edu>
Subject: 'man' completion
Date: Thu, 27 Aug 1998 11:51:05 +1000 [thread overview]
Message-ID: <19980827115105.A13312@tertius.net.au> (raw)
In-Reply-To: <980826103628.ZM21060@candle.brasslantern.com>; from Bart Schaefer on Wed, Aug 26, 1998 at 10:36:27AM -0700
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
next prev parent reply other threads:[~1998-08-27 1:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-26 15:42 Command alias in non-command position Andrej Borsenkow
1998-08-26 16:35 ` Bruce Stephens
1998-08-26 17:01 ` Zefram
1998-08-26 17:13 ` Bruce Stephens
1998-08-26 17:26 ` Andrej Borsenkow
1998-08-26 17:49 ` Bart Schaefer
1998-08-26 17:36 ` Bart Schaefer
1998-08-27 1:51 ` Gossamer [this message]
1998-08-27 9:14 ` 'man' completion Bruce Stephens
1998-08-27 17:09 ` Bart Schaefer
1998-08-28 16:42 ` Sven Guckes
1998-08-28 17:58 ` Bart Schaefer
1998-08-30 17:03 ` maillist archive lacking search engine Sven Guckes
1998-09-01 12:51 ` Command alias in non-command position Wayne Davison
1998-08-31 8:57 'man' completion Stephen Riehm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19980827115105.A13312@tertius.net.au \
--to=gossamer@tertius.net.au \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).