Subject: bug#23032: 25.0.91; Eshell misinterprets TRAMP multi-hop paths as pipes

From: Michael Albinus <[email-masked]>
Date: Fri, 18 Mar 2016 10:07:20 +0100

William G. Gardella <[email-masked]> writes:

Hi William,

> Steps to reproduce:
>
> 1. M-x eshell
>
> 2. Type a TRAMP path that makes an ad-hoc multi-hop connection,
>    such as:
>
>    cd /sshx:user@host|sudo:root@host:
>
> 3. Eshell responds "sudo:root@host:: command not found"
>
> 4. Type the same TRAMP path, but wrapped in quotes:
>
>    cd "/sshx:user@host|sudo:root@host:"
>
> 5. Eshell successfully navigates to the path.
>
> It seems that eshell too eagerly notices the pipe character
> and assumes that it's reading a piped command line,
> rather than first noticing that the character is inside a TRAMP path.

I don't know whether we can/shall do something about. After all, eshell
is a shell-like command interpreter, and the pipe symbol is a special
one. Like in other shells, special symbols must be escaped. Both
"/sshx:user@host|sudo:root@host:" and /sshx:user@host\|sudo:root@host:
work in eshell. Other special symbols, like a space in a filename, would
require similar quoting.

We shall extend the eshell manual pointing about this. Hmm, looks like
the manual even speaks about pipes ...

Best regards, Michael.