Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 'man' completion
- X-seq: zsh-users 1767
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: ZSH users mailing list <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: 'man' completion
- Date: Thu, 27 Aug 1998 10:09:54 -0700
- In-reply-to: <vbyasahjmt.fsf@xxxxxxxxxxxxxxx>
- References: <000a01bdd108$27f40910$21c9ca95@xxxxxxxxxxxxxxx> <vbk93v8zwm.fsf@xxxxxxxxxxxxxxx> <980826103628.ZM21060@xxxxxxxxxxxxxxxxxxxxxxx> <19980827115105.A13312@xxxxxxxxxxxxxx> <vbyasahjmt.fsf@xxxxxxxxxxxxxxx>
On Aug 27, 10:14am, Bruce Stephens wrote:
} Subject: Re: 'man' completion
}
} Gossamer <gossamer@xxxxxxxxxxxxxx> writes:
}
} > 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
}
} Ah. I think if you stick a -f right after the compctl, then that'll
} give you filename completion too.
Yes, that's right, but it might be preferable to use -g with the same
pattern that's in the R[] expression:
compctl -/ -g '*.([1-9nlo]|[1-9](|[a-z]))' ...
Also, I don't know what the "match-man" function does, but if it's nothing
more than a search of $MANPATH as Gossamer's comment suggested, then it
can be replaced with
-g "${(@)^${(s(:))MANPATH}}/*/*.([1-9nlo]|[1-9](|[a-z]))(:t:r)"
The only missing bit being that if you want to use the section number to
restrict the search (i.e. "man 5 x<TAB>" completes only to "xferlog" and
not to "xterm" etc.), then you need a function.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author