Fix wildcard expansion doubling up "*/"

In some cases we add the wildcard twice.

    $ fish -c '../jj; complete -C"ls cli/*/conf/tem"'
    cli/*/*/config/templates.toml

Fix that. Test in the next commit.

There seems to be another bug in 3.7.1 where we fail to apply this completion
to the command line. This appears fixed. (FWIW we might want to revert
the quoting change in completion_apply_to_command_line(), maybe that one
accidentally fix this).

Fixes #10703
This commit is contained in:
Johannes Altmanninger 2024-09-06 16:27:57 +02:00
parent 325b51aca0
commit f8a720da8c

View file

@ -612,7 +612,7 @@ mod expander {
&mut dir,
wc_segment,
wc_remainder,
&(effective_prefix.to_owned() + wc_segment + L!("/")),
effective_prefix,
);
} else {
// Last wildcard segment, nonempty wildcard.