Subject: bug#24888: pcomplete/cd returns "../" before "./" and does not include empty completion in results of pcomplete-at-point

From: Dmitry Gutov <[email-masked]>
Date: Mon, 7 Nov 2016 02:15:00 +0200

On 06.11.2016 01:53, Clément Pit--Claudel wrote:

> This invokes (assuming a low enough completion delay) pcomplete-at-point (the call goes through company-capf, which relies on completion-at-point-functions, which contains comint-dynamic-completion, which includes pcomplete-at-point).

Does it? It seems to go through comint-completion-at-point here, which 
tries comint-c-a-p-replace-by-expanded-history and 
comint-filename-completion, neither of which reference pcomplete.

comint-filename-completion seems to be the function to investigate.

> * "../" comes first, which causes the default completion to be "/home/clement/../".
> * pcomplete's list doesn't include "/home/clement/" itself.
>
> Fixing the second problem would fix the first one;

Sounds good to me.