zsh-users
 help / color / mirror / code / Atom feed
From: Eric Nielsen <eric@amalgamar.com.br>
To: Zsh Users <zsh-users@zsh.org>
Subject: Completion matching from the left first, then fuzzy
Date: Thu, 29 Mar 2018 00:12:24 +0000	[thread overview]
Message-ID: <CP2P152MB062540DEDDC443350B4103D5EFA20@CP2P152MB0625.LAMP152.PROD.OUTLOOK.COM> (raw)

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

I have the following matcher-list configuration:

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

It's case-insensitive, but most importantly for what I want to discuss, it does
a (default) match from the left first, then a fuzzy match.

I'm getting the following behavior when trying to complete `ef`:

    % touch abef abcdef
    % vi ef
    press <tab>
    % vi abef
           ^ cursor here
    press <tab>
    % vi abef
              ^ cursor here

Behavior is the same as described above even if I `setopt COMPLETE_IN_WORD`.

I would expect the following behavior, at least when `COMPLETE_IN_WORD` is
enabled:

    % touch abef abcdef
    % vi ef
    press <tab>
    % vi abef
           ^ cursor here
    press <tab>
    % vi abef
           ^ cursor here, and menu is displayed below
    -- file --
    abcdef abef

What am I missing in my configuration?

As expected, I get the following behavior when completing `ab`:

    % touch abef abcdef
    % vi ab
    press <tab>
    % vi ab
           ^ cursor here, and menu is displayed below
    -- file --
    abcdef abef

Cheers,
Eric Nielsen

                 reply	other threads:[~2018-03-29  0:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CP2P152MB062540DEDDC443350B4103D5EFA20@CP2P152MB0625.LAMP152.PROD.OUTLOOK.COM \
    --to=eric@amalgamar.com.br \
    --cc=zsh-users@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).