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

Re: Improvements to the gcc completion script



On 23 Mar, "Jun. T" wrote:
> Does anyone know a way to prevent '--' from being split in 'partial word completion'?

It is possible if you check for a -- in $PREFIX and don't add the other
matches when it is found. That might subvert approximate completion,
however. It ought to be possible with matching control. It is likely
more useful to note the limitation in the BUGS file than to try some
hack for gcc completion. Mostly, it is rare to have long options
starting with both -- and -.

The || forms seem hopeful at first sight because we want to map the gap
to the left of a - but to the right of anything to *. But the ranchor
only needs to match the trial completion string so that doesn't work. I
think the || forms were added in an attempt to handle CamelCase but they
don't entirely work for that. 'l:[^-]||-=*' seems to be able to add
extra characters whether there is no - in either the candidate or on the
command-line. That can't be right.

'r:[^-]|-=* r:|=*' is also close but the character matching [^-] is not
treated as an anchor so it can be mapped to anything.

Was this the only outstanding issue for the contributed _gcc update?
What's the status otherwise?

I've briefly looked at the changes and it looks good to me. It does add
a commented out line that assigns args2 without the file glob. That
serves no useful purpose, was probably debug that got left in and should
be stripped.

Oliver




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