Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Adding a prefix to certain filename completions
- X-seq: zsh-users 9037
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: Adding a prefix to certain filename completions
- Date: Tue, 05 Jul 2005 17:01:57 +0000
- In-reply-to: <20050704193711.GF6330@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050704193711.GF6330@xxxxxxxxxxxxxxxx>
On Jul 4, 9:37pm, Nikolai Weibull wrote:
} Subject: Adding a prefix to certain filename completions
}
} Vim has issues with files that begin with a + (or two +s for that
} matter), so I'd like to add a ./ prefix to such files when completing.
YOu can get most of the way there with this:
zstyle -e ':completion:*:vim:*' fake-files 'reply=("$PWD:$(print ./+*)")'
zstyle ':completion:*:vim:*' matcher 'b:+=./+'
However, all that does is offer the ./+* as alternatives, it doesn't
remove the originals. The trouble is that file completion is sensitive
to directory separators, so as soon as you introduce the slash, the
rules begin to apply to the stuff on the right of the slash rather
than to the entire string.
You'd be better off if there were some other way to protect the + from
interpretation by vim.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author