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

Re: [PATCH] Quote components before using it is pattern



Hi,

> A component might contain a character active in patterns, like * or ().
> Take for example the path /tmp/foobar). Passing this and /tmp/foo123 as a
> completion to _multi_parts results in an error:
>
> _multi_parts:147: bad pattern: (foo123|foobar))*
>
> The characters in the temporary variable tmp1 must be quote, before the
> pattern is build with them.

Here is a simple test that shows the error in the old version:

% compdef '_multi_parts -- / mpcompletions' mptest
% mpcompletions=( a/foo\) a/f123 )
% mptest a/<TAB>
_multi_parts:147: bad pattern: (foo)|f123)*

Bye, Jörg.

Attachment: signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP



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