zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: "Jun. T" <takimoto-j@kba.biglobe.ne.jp>
Cc: zsh-workers@zsh.org
Subject: Re: Improvements to the gcc completion script
Date: Wed, 31 Mar 2021 14:31:30 +0200	[thread overview]
Message-ID: <56973-1617193890.190979@qzz3.XNO_.UryG> (raw)
In-Reply-To: <DFACBC1A-8CFA-4E52-B300-C2BD2AC1901C@kba.biglobe.ne.jp>

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


  reply	other threads:[~2021-03-31 12:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  4:07 Jacob Gelbman
2021-03-19  3:51 ` Jun T
2021-03-22  2:28   ` Jacob Gelbman
2021-03-22  2:29     ` Jacob Gelbman
2021-03-22 15:18     ` Jun. T
2021-03-31 12:31       ` Oliver Kiddle [this message]
2021-03-31 14:53         ` Jun. T
2021-03-31 15:06           ` Jun. T
2021-03-31 18:37             ` two anchor forms of matching control (was Re: Improvements to the gcc completion script) Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56973-1617193890.190979@qzz3.XNO_.UryG \
    --to=opk@zsh.org \
    --cc=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).