Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to add completion: variant of "make" command
- X-seq: zsh-users 11468
- From: Kai Grossjohann <kai@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: How to add completion: variant of "make" command
- Date: Wed, 02 May 2007 17:24:22 +0200
- Cancel-lock: sha1:1u4Pfst1y+UZ3gvLZ2VaRyZz9XE=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <868xca9hqu.fsf@xxxxxxxxxxxxxxxxx> <200704301256.l3UCuQcH017677@xxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx> writes:
> Kai Grossjohann wrote:
>> So how do I make a variant of "make" completion that does what the
>> shell script does before it invokes regular "make" completion?
>
> You need to write your own make replacement and tell the shell to
> use that.[...] As long as it ends up with a call to the normal _make
> you can add any preprocessing you like.
Cool. I ended up with the following in my ~/.zshrc:
_xmake () {
if [ -r ./ENV ]; then
. ./ENV
fi
_make "$@"
}
compdef _xmake xmake
It seemed to be too small to put it anywhere else :-) Amazingly
enough, I already had a function and a compdef call; I just hadn't
thought that I could just call the existing function _make... D'oh.
Thanks a lot!
Kai
Messages sorted by:
Reverse Date,
Date,
Thread,
Author