Skip to content

limactl list --all-fields only works when output is to a terminal #3986

@jandubois

Description

@jandubois

There is no way to specify the desired width if output is to a stream or pipe:

l ls --all-fields
NAME    STATUS     SSH            VMTYPE    ARCH       CPUS    MEMORY    DISK    DIR
bar     Stopped    127.0.0.1:0    vz        aarch64    4       4GiB      2MiB    ~/.lima-empty/bar
baz     Stopped    127.0.0.1:0    vz        aarch64    4       4GiB      3MiB    ~/.lima-empty/baz
foo     Stopped    127.0.0.1:0    vz        aarch64    -1      4GiB      1MiB    ~/.lima-empty/fool ls --all-fields | cat
NAME    STATUS     SSH            CPUS    MEMORY    DISK    DIR
bar     Stopped    127.0.0.1:0    4       4GiB      2MiB    ~/.lima-empty/bar
baz     Stopped    127.0.0.1:0    4       4GiB      3MiB    ~/.lima-empty/baz
foo     Stopped    127.0.0.1:0    -1      4GiB      1MiB    ~/.lima-empty/foo

This also makes it impossible to create integration tests for it.

Suggestion: add --width option to specify the terminal width. Should override even actual width when writing to a terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions