Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Autocomplete doesn't work correctly on certain folder names
- X-seq: zsh-workers 51667
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Cc: Ville Viitaharju <racle@xxxxxxxx>
- Subject: Re: Autocomplete doesn't work correctly on certain folder names
- Date: Fri, 21 Apr 2023 12:59:13 -0700
- Archived-at: <https://zsh.org/workers/51667>
- In-reply-to: <CAH+w=7YQPWs6jVTmNvtuhYqLrmuGaObgmnxUVoEjCvzHy5MWtg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAEQc7iXik1WSQYt3XzSkRugwo6HOLifX7rzTWbBXXoc4bFCsxQ@mail.gmail.com> <CAN=4vMoeZ3JFkfgmv7HgnNye68Ad0vZ1VJUjw28MwF9Gdh3h8g@mail.gmail.com> <CAEQc7iXVyTnEU+4aEOLX7ODivo1T1BOq+D=ynoSeuUc8VakujQ@mail.gmail.com> <CAN=4vMrYYYTpvWQgSa4ScQUNAC9_kHzDNFSy09fwBwD4w-37fQ@mail.gmail.com> <CAH+w=7YQPWs6jVTmNvtuhYqLrmuGaObgmnxUVoEjCvzHy5MWtg@mail.gmail.com>
On Thu, Apr 20, 2023 at 8:35 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author