zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Karel Balej <balejk@matfyz.cz>
Cc: zsh-workers@zsh.org
Subject: Re: [RFC PATCH 1/2] complete absolute paths for mpc add
Date: Sun, 10 Nov 2024 15:10:55 -0800	[thread overview]
Message-ID: <CAH+w=7YmmvYqdnNzbLRJd6y5pgNj0ceD=PhjeHiN4A5FtOf8jQ@mail.gmail.com> (raw)
In-Reply-To: <D5IQ82P71IOB.2WLM65LN09CG5@matfyz.cz>

On Sun, Nov 10, 2024 at 10:56 AM Karel Balej <balejk@matfyz.cz> wrote:
>
> Thank you, this seems to give me the same results as the original,
> however I don't immediately see any difference in behaviour even when I
> force _mpc_helper_files to fail -- the _files results are still
> completed even without the ret handling. Or do I just misunderstand how
> this should work?

You won't get any fewer completions -- all those added by _files will
still be valid -- but if there is another (perhaps less specific)
possible completer after _mpc_helper_files fails, then additional
possible matches from that other completer will also be added.  In
ordinary circumstances, completion stops after a completer returns
success, unless specially programmed to continue.

>... possibly simpler to just have _mpc_helper_files fail on no matches
> and have the completion fall back to _files only then?

If, when _mpc_helper_files does find something, you don't mind
skipping files that _mpc_helper_files does not find, you can certainly
do that.


  reply	other threads:[~2024-11-10 23:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27 16:31 Karel Balej
2024-09-27 16:31 ` [RFC PATCH 2/2] enable completion for mpc insert Karel Balej
2024-11-09 15:21 ` [RFC PATCH 1/2] complete absolute paths for mpc add Karel Balej
2024-11-09 19:44 ` Bart Schaefer
2024-11-10 18:56   ` Karel Balej
2024-11-10 23:10     ` Bart Schaefer [this message]
2024-11-11 19:26       ` Karel Balej
2024-11-12  2:52         ` 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='CAH+w=7YmmvYqdnNzbLRJd6y5pgNj0ceD=PhjeHiN4A5FtOf8jQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=balejk@matfyz.cz \
    --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).