Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Reinsertion of file prefix for accepted completion?



Hi,

Is there some way (that isn't too outrageous, but perhaps involves the
calling of a 'fixup' function) to reinsert a compadd -W file prefix when
the completion is accepted? For example, pretend that arguments for 'echo'
are paths, being matched using -W "( . /not/current/directory )":

% ls /not/current/directory<Enter>
a1 a2 b1 c1
% ls<Enter>
d1 d2 e1
% echo a<Tab>
a1 a2
% echo a1<Tab><Enter>
/not/current/directory/a1
% echo b<Tab><Enter>
/not/current/directory/b1
% echo e<Tab><Enter>
e1

Or at worst:

% echo e<Tab><Enter>
./e1

(The above notation is probably a bit ambiguous, but hopefully my first
paragraph helps explain what I mean.)




Messages sorted by: Reverse Date, Date, Thread, Author