Subject: Re: bug#51130: 29.0.50; shell completion fails to complete filenames

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 13 Sep 2022 13:19:07 +0200

Stefan Monnier <[email-masked]> writes:

>>     * lisp/shell.el: Require and use pcomplete.
>>     (shell-dynamic-complete-functions): Add pcomplete-completions-at-point.
>>     (shell-completion-vars): Set pcomplete-default-completion-function.
>>
>> Just leaving pcomplete-default-completion-function alone seems to give
>> better results in shell-mode (after testing very briefly), so I'm not
>> sure why that was added.
>
> It was added because leaving `pcomplete-default-completion-function`
> alone means that the functions after `pcomplete-completions-at-point` in
> `shell-dynamic-complete-functions` are not used any more.

Uhm...  I don't follow the logic at all.
pcomplete-default-completion-function is documented to be applied if
everything else has failed to do completion, isn't it?