zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Cc: Ville Viitaharju <racle@lonke.ro>
Subject: Re: Autocomplete doesn't work correctly on certain folder names
Date: Fri, 21 Apr 2023 12:59:13 -0700	[thread overview]
Message-ID: <CAH+w=7YP54qzH6wLw5XYUVOFX3a3AjVXOzVnBux956KHHe=f-A@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7YQPWs6jVTmNvtuhYqLrmuGaObgmnxUVoEjCvzHy5MWtg@mail.gmail.com>

On Thu, Apr 20, 2023 at 8:35 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> If someone's willing to extract the matcher-list styles that oh-my-zsh
> is setting, it'd make this easier to check.  Docker or not, I'm simply
> not going to wade through the rest of OMZ to investigate.

On Fri, Apr 21, 2023 at 12:10 AM Carlo Sala <carlosalag@protonmail.com> wrote:
>
> Everything relevant in omz related to matcher-list styles is here.

OK, thanks.  The following matcher-list demonstrates the oddity:

zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'

OMZ actually uses [:lower:] and [:upper:] but I wanted to rule out that detail.

No solution yet, but I believe this is a completely different bug.
The one previously mentioned (workers/50325) was an off-by-one when
selecting the character in the right-hand set of m:{a-zA-Z}={A-Za-z}
to correspond to the character in the left-hand set.  The bug reported
by VIlle appears to be a problem with the input strings (that is, the
file names).  Given the provided example of

my-longfoldername-firstname
you-longfoldername-secondname

I believe** the resulting partial completion should be

y-longfoldername-

but when the part before the first hyphen is longer in the second file
name, the wrong character from the second name is chosen.  I took a
few stabs at different names and the ordering appears also to be
important, e.g. if I try with

jou-longfoldername-secondname
mj-longfoldername-firstname

I get the slightly different but less obviously wrong** answer

-longfoldername-

(that is, the "j" in common is not found at all).  Other eyeballs on
this would be appreciated.

** I may be incorrect about the expected answer, the juxtaposition of
the prefix with the first hyphen also seems to matter.


  reply	other threads:[~2023-04-21 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEQc7iXik1WSQYt3XzSkRugwo6HOLifX7rzTWbBXXoc4bFCsxQ@mail.gmail.com>
     [not found] ` <CAN=4vMoeZ3JFkfgmv7HgnNye68Ad0vZ1VJUjw28MwF9Gdh3h8g@mail.gmail.com>
     [not found]   ` <CAEQc7iXVyTnEU+4aEOLX7ODivo1T1BOq+D=ynoSeuUc8VakujQ@mail.gmail.com>
     [not found]     ` <CAN=4vMrYYYTpvWQgSa4ScQUNAC9_kHzDNFSy09fwBwD4w-37fQ@mail.gmail.com>
2023-04-21  3:35       ` Bart Schaefer
2023-04-21 19:59         ` Bart Schaefer [this message]
2023-04-26  4:22           ` Jun T
2023-04-21  7:09 Carlo Sala

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='CAH+w=7YP54qzH6wLw5XYUVOFX3a3AjVXOzVnBux956KHHe=f-A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=racle@lonke.ro \
    --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).