Subject: bug#79151: 31.0.50; eshell does not complete filename arguments with tramp

From: Daniel Mendler <[email-masked]>
Date: Mon, 04 Aug 2025 11:37:53 +0200

Michael Albinus <[email-masked]> writes:

> Daniel Mendler <[email-masked]> writes:
>
> Hi Daniel & Jim,
>
>>     ;; Determine, whether remote file names shall be completed.  They
>>     ;; shouldn't for external commands, or when in a pipe.  Respect
>>     ;; also `eshell-cmpl-remote-file-ignore', which could be set by
>>     ;; the user.
>>
>> I often want to complete file names in when I am executing a command in
>> a remote directory, also for external commands, and maybe also as part
>> of a pipe.
>
> I also don't remember the reason, why remote file name completion was
> discarded for external command's arguments and pipes. Performance?
>
> If this is what users want, we should get rid of this restriction.

As I understand bug#65356 the problem was that file completion sets in
in unwanted cases. Back then you pushed the 'pcomplete-remote-file-ignore'
workaround with this comment:

    Let's just go with the change to add 'pcomplete-remote-file-ignore' for 
    now. I'll have to think more about how Eshell can selectively ignore 
    remote files correctly in all cases; there are a bunch of areas where 
    Eshell could be smarter about completion already, and I have the feeling 
    they'll conflict with each other if we don't plan this out carefully...

But unfortunately this breaks useful behavior in many more cases which I
care about more than occasional false completions. For me one of the
selling points of Eshell is that I can seamlessly browse around on
remote hosts via cd. But then file name completion refuses to work.

> Best regards, Michael.