Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
'man' completion
- X-seq: zsh-users 1765
- From: Gossamer <gossamer@xxxxxxxxxxxxxx>
- To: ZSH users mailing list <zsh-users@xxxxxxxxxxxxxxx>
- Subject: 'man' completion
- Date: Thu, 27 Aug 1998 11:51:05 +1000
- In-reply-to: <980826103628.ZM21060@xxxxxxxxxxxxxxxxxxxxxxx>; from Bart Schaefer on Wed, Aug 26, 1998 at 10:36:27AM -0700
- References: <000a01bdd108$27f40910$21c9ca95@xxxxxxxxxxxxxxx> <vbk93v8zwm.fsf@xxxxxxxxxxxxxxx> <980826103628.ZM21060@xxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxx | 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author