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

Re: Autocomplete doesn't work correctly on certain folder names



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