Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: trying to learn zstyle
- X-seq: zsh-users 2800
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: ZSH Mail List <zsh-users@xxxxxxxxxxxxxx>
- Subject: Re: trying to learn zstyle
- Date: Wed, 22 Dec 1999 23:13:06 +0000
- In-reply-to: "Shao Zhang"'s message of "Wed, 22 Dec 1999 11:49:28 +1100." <19991222114928.A29277@localhost>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
Shao Zhang wrote:
> How do I use zstyle to make mtvp to complete to the files with
> *.mpg or *.mpeg or *.MPG and so on.
Sorry, missed this bit. The easy answer (again, this is post-3.1.6) is
_mtvp() {
local expl
_description files expl 'MPEG file'
_files "$expl[@]" -g '*.(mpg|mpeg|MPG)'
}
compdef _mtvp mtvp
I got that simply by copying the file _gunzip, which does the same thing
with .gz files. Copying existing files is usually the way.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author