zsh-users
 help / color / mirror / code / Atom feed
From: Kamil <crs@wafel.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Completion: setting up _approximate.
Date: Sun, 9 Jul 2017 07:30:35 +0300	[thread overview]
Message-ID: <20170709043035.zwatqx2cfvmujehb@calculator> (raw)
In-Reply-To: <CAH+w=7YUOO0efSUgoZqxaYHE3MY6_71Nghz8Bsr18eE1UJMBbA@mail.gmail.com>

On 08/07/17 14:24, Bart Schaefer wrote:
> You haven't said what version of zsh you are using, that may be
> significant.

Hey Bart,

thanks for your response.

I am on zsh 5.3.1 (x86_64-apple-darwin16.6.0), as you can see this is on
Mac OS.

>> /v/m/s/f/3
>>
>> completed to:
>>
>> /Volumes/Media/Series/Fargo/Season\ 03
>>
>> What I am getting instead is:

Should have said that all but last parts are matched correctly: I get it
expanded to: /Volumes/Media/Series/Fargo/Season\ 01/ with menu printed.

> Those choices are obviously coming from _approximate, so the first
> thing to try is to remove that from your completer style and see what
> you get.

No matches found, when I remove _approximate from completer list.

(that's my format for warnings)

> _match should be doing nothing because there are no patterns in your
> initial string, but both it and _approximate should be called only
> when _complete returns nonzero.

I tried /v/m/s/f/S3, still completes to Season\ 01.

But /v/m/s/f/S*3 and /v/m/s/f/*3 works fine so I assume _match is doing
its job properly.

> Please confirm that you're completing this in command position, for
> use with autocd.

Correct, /v/m/s/f/3 is the only string in buffer. I also tried with cd
command, with same results.

>> I was trying to configure matcher-list but couldn't figure out how to
>> make that work.

> There's nothing inherently wrong with the matcher-list that you showed
> us.

Reverted to my previous:

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

as I was getting some issues with the other one. Just letting you know
in case it actually changes anything.

Thanks,

-- 
Kamil


  reply	other threads:[~2017-07-09  4:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  9:17 Kamil
2017-07-08 21:24 ` Bart Schaefer
2017-07-09  4:30   ` Kamil [this message]
2017-07-09 16:47     ` Bart Schaefer
2017-07-10  8:16       ` Kamil
2017-07-09 11:11   ` Oliver Kiddle
2017-07-09 12:08     ` Kamil
2017-07-09 14:58       ` Daniel Shahaf
2017-07-09 16:32     ` Bart Schaefer

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=20170709043035.zwatqx2cfvmujehb@calculator \
    --to=crs@wafel.com \
    --cc=schaefer@brasslantern.com \
    --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).