Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Adding a prefix to certain filename completions
- X-seq: zsh-users 9040
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Adding a prefix to certain filename completions
- Date: Wed, 06 Jul 2005 05:00:22 +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050705172846.GB5362@xxxxxxxxxxxxxxxx> <20050704193711.GF6330@xxxxxxxxxxxxxxxx> <20050705042324.GA21301@xxxxxxxxxxxxxxxxx> <20050705080946.GC5333@xxxxxxxxxxxxxxxx> <Pine.OSX.4.58.0507050720380.17349@xxxxxxxxxxxxxxx> <20050705172846.GB5362@xxxxxxxxxxxxxxxx>
> I'm sure something along the same lines can
> done with zstyle and compadd and all that other wackiness.
>
> compctl -f -x 'S[+]' -f -P './' -- vim
<span class="hand" style="position: forehead"> smack </span>
I had assumed there was already an _vim completion, but there's not.
So just write one.
_vim() {
[[ $PREFIX = +* ]] && _files -P './' || _files
}
compdef _vim vim
Messages sorted by:
Reverse Date,
Date,
Thread,
Author