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

From: Stefan Monnier <[email-masked]>
Date: Wed, 14 Sep 2022 10:27:37 -0400

>> The change I introduced tried to preserve as much of the existing
>> completion as possible, by only using the non-fallback pcomplete
>> rules and keeping the existing `shell-filename-completion` and
>> `comint-filename-completion` thingies as the fallback.
>>
>> I don't know that it's the best choice.  It was just the
>> conservative choice.
>
> Could just put an additional function at the end of the list there
> that does what pcomplete-completions-at-point does when
> pcomplete-default-completion-function isn't set to #'ignore?

Could be.  Tho it feels like adding yet another hack upon more hacks
just because we don't know what the other code does.
[ Which is exactly what I did as well when I set
  `pcomplete-default-completion-function` to `ignore`.  ]

I wish someone could take the time to try and understand what
`shell-filename-completion` and `comint-filename-completion` do there
really (I mean, I understand what they're supposed to do, but I don't
understand why they're both there), how they compare to what
`pcomplete-default-completion-function` does by default (which should be
very similar), and then fix bug#51130 The Right Way.

        Stefan