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

Re: [RFC PATCH 1/2] complete absolute paths for mpc add



On Sun, Nov 10, 2024 at 10:56 AM Karel Balej <balejk@xxxxxxxxx> 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.




Messages sorted by: Reverse Date, Date, Thread, Author