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

Re: grouping in patterns in extended compctl



John Harres wrote:
>   'c[-2,add][-2,delete][-2,modify][-2,query] c[-1,volume] s[-] , s[-m_]' -k volparams -- sc
>
>Unfortunately, what need to do with the second pattern set is say:
>
>if two words ago was one of 'add delete modify, or query', and one word ago
>was 'volume' and the current word starts with - or -m_, then match with any
>of the volparams array.  Unfortunately, the default precedence appears to and
>the c[-1,volume] and s[-] before the or'ing of s[-] , s[-m_].  Suggestions?

You could repeat the "c[-2,...] c[-1,volume]" part after the comma.

>This could end up being one of the longest compctl's ever built!

Have you looked at the gcc compctl in Misc/compctl-examples?

>                                                                  Which brings
>up another question:  what's the max length of one of these?

How much memory do you have?

-zefram



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