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

_files with match-specs



Hey,
Not sure if i am doing something incorrect here but:

% _foo() _files -M 'L:|+='; compdef _foo foo

then
% foo +<tab>
Complete files, but removes the leading +.

When i give the same match-spec to compadd directly, it works as i expected.

% _foo() compadd -M 'L:|+=' -- *(N); compdef _foo foo

then
% foo +<tab>

Is the behavior of _files expected? If so, how should I go about
completing filenames, ignoring a possible leading + character?



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