zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: handle multibyte chars in compset -p/-s
Date: Mon, 09 Oct 2017 10:50:49 +0100	[thread overview]
Message-ID: <20171009105049.33588962@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <17691.1507542140@thecus.kiddle.eu>

On Mon, 09 Oct 2017 11:42:20 +0200
Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> On 7 Oct, I wrote:
> > Incidentally, while pondering such a solution, I noticed that
> > compset -p is removing bytes rather than characters to IPREFIX which
> > would have been useful in this case but should be corrected.
> 
> Having further checked uses of compset -p, I'm satisfied that compset -p
> and -s should be handling multibyte characters so this is a patch to do
> that. Is mb_metacharlenconv and backwardmetafiedchar as used here the
> best way to do that?

Probably --- it certainly doesn't look any more clumsy than the rest of
the multibyte handling.  Going backwards is a pain so closing your eyes
and calling the function is probably correct, and going forward that
family of function calls are much more efficient.

(BTW the real horror for multibyte characters in completion is matching
control --- it's tied to single-character array handling and at a point
where conversion from and to wide characters isn't particularly
convenient.  I gave up on this after looking for some weeks about a
decade ago.)

pws


      reply	other threads:[~2017-10-09  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07  0:03 PATCH: _arguments sets mixing rest/option arguments Oliver Kiddle
2017-10-09  9:42 ` PATCH: handle multibyte chars in compset -p/-s Oliver Kiddle
2017-10-09  9:50   ` Peter Stephenson [this message]

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=20171009105049.33588962@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --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).