Subject: Re: bug#49776: 28.0.50; Incorrect username completion results reported by `read-file-name-interal`

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 04 Aug 2021 08:13:08 +0200

Daniel Mendler <[email-masked]> writes:

>> ustring here is "~man", and the boundary is 1, so completion--twq-all
>> returns "/foo/~man" (because it stripped off 1 character at the start).
>> 
>> But it should have stripped off "~/foo/~", I think?  Somehow?
>
> Yes. I think the problem here is the wrong completion boundary. The
> completion boundary should be placed such that the shadowed path is not
> part of the completion. In this case the completion boundary should be
> behind the second "~".

Yup.  But my understanding of the completion code is extremely limited,
so hopefully somebody who understands it better can propose a fix...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no