Subject: minor inconsistency in filename completion listing

From: Nicolas Graner <[email-masked]>
Date: Sat, 12 Nov 2022 00:11:33 +0100

When reading a file name in the minibuffer, in some very specific cases
the names listed in the completion buffer are shown with their directory
instead of just the base name.

This is only a display problem, it doesn-t affect the file name actually
read.

Example (starting from emacs -Q):

M-x mkdir ~/d1<RET>
M-x mkdir ~/d2<RET>
M-x mkdir ~/x<RET>
M-x cd  ~/x<RET>
M-x cd ~/d<TAB>

The *Completions* buffer now shows:
    x/~/d1
    x/~/d2

instead of:
    d1
    d2

This seems to be an old bug (found in emacs 26, I haven't checked
before) still present in 29 master.

Nicolas