Samuele FAVAZZA <[email protected]> writes:

> Hello all,

Hi Samuele,

> The observed issue concerns the listing of containers suggested after
> inserting either '/docker:' or '/podman:' as tramp connection methods.
> In particular the 'docker' method flawlessly lists the available
> containers that can be accessed but 'podman' does not.
>
> Searching for the cause I identified the issue in the
> 'tramp-container--completion-function' function. Upon invocation
> of the '[podman|docker] ps --format '{{.ID}}\t{{.Names}}' command, the
> resulting list of strings are different. See the examples below
> (executed in a shell after starting a container in docker and one in
> podman):
>
>
> $ docker ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1
>   0000000   3   2   e   5   d   a   8   f   9   5   d   8  \t   v   a   n
>
> $ podman ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1
>   0000000   c   c   c   f   e   9   7   6   1   c   5   3           r   e
>
> As can be observed 'podman' replaces the '\t' charter with a sequence of
> 2 spaces, causing the parsing of the tool output to fail in
> 'tramp-container--completion-function'.

I'm curious: where do you run podman? In my Fedora 44 system, I see

--8<---------------cut here---------------start------------->8---
$ podman ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1
0000000   c   1   6   f   7   d   2   4   0   7   b   2  \t   g   r   a
$ podman -v
podman version 5.8.3
--8<---------------cut here---------------end--------------->8---

Or is it your shell, which does the transformation?

> I have successfully tested the following patch:

Likely, we will apply your patch. But first I'd like to understand why
this happens.

> Best regards,
> Samuele Favazza

Best regards, Michael.

Reply via email to