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

Re: When _ra_comp() in _regex_arguments() gets called ?



On Mar 29,  9:56am, Han Pingtian wrote:
} Subject: When _ra_comp() in _regex_arguments() gets called ?
}
} Hey,
} 
} I'm trying to understand the utility function "_regex_arguments()" and
} stuck at when the _ra_comp() is called. This function is placed in array
} "regex" something like ":_ra_comp :'compadd aaa'". There is a colon
} before its name. What does the colon mean here?

It's a delimiter for Modules/zutil.c: rparseelt(), I think.  The whole
array built with ":_ra_comp ..." elements is passed to the zregexparse
builtin, which is one of those functions that implement the internals
of completion and which it was not deemed useful to explain to someone
reading "man zsh".

Unfortunately it was never documented for the developers, either.  The
best reference is zsh-workers/9154 and 9156, and the original shell
code in workers/7720 which zregexparse replaced.



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