zsh-workers
 help / color / mirror / code / Atom feed
From: Johan Grande <nahoj@crans.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: _files -g <pattern> offers files that don't match the pattern and conversely
Date: Sat, 15 Jul 2023 18:51:27 +0200	[thread overview]
Message-ID: <30192b9e-b6a8-e19f-efb5-5af0fb710951@crans.org> (raw)
In-Reply-To: <CAH+w=7YjU_M39G+odhuhCMUz_uyGB2J7c3f1iej-uPkzEgvc2Q@mail.gmail.com>

Le 15/07/2023 à 18:16, Bart Schaefer a écrit :
> On Sat, Jul 15, 2023 at 6:32 AM Johan Grande <nahoj@crans.org> wrote:
>>
>> % _f() { _files -g 'c(.)' }; compdef _f f
>> % f <tab>
>> a  b       # even though 'a' and 'b' don't match the pattern
> 
> The only way I can make this happen is if "a" and "b" are directories.
> _files will complete local directory names if there are no matching
> files.

In my test they are regular files, but the problem disappears if I 
replace /usr/share/zsh/functions/Completion/ with that of zsh 5.9, so it 
seems that this one was fixed.

>> [...]
>> % _f() { _files -g 'c' }; compdef _f f
>> % f <tab>  # becomes
>> % f c      # even though there is no such file
> 
> There's only one possible completion, so it's offered.
> 
OK, thank you.

-- 
Johan



  reply	other threads:[~2023-07-15 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-15 13:31 Johan Grande
2023-07-15 13:34 ` Johan Grande
2023-07-15 16:16 ` Bart Schaefer
2023-07-15 16:51   ` Johan Grande [this message]
2023-07-15 21:28     ` 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=30192b9e-b6a8-e19f-efb5-5af0fb710951@crans.org \
    --to=nahoj@crans.org \
    --cc=schaefer@brasslantern.com \
    --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).