Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limactl list: dynamically reduces the column, depending on the terminal width #1204

Closed
AkihiroSuda opened this issue Nov 25, 2022 · 7 comments · Fixed by #1266
Closed

limactl list: dynamically reduces the column, depending on the terminal width #1204

AkihiroSuda opened this issue Nov 25, 2022 · 7 comments · Fixed by #1266

Comments

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Nov 25, 2022

We are going to have too many columns:

$ limactl ls
NAME       STATUS     SSH            VM TYPE    ARCH      CPUS    MEMORY    DISK      DIR
default    Stopped    127.0.0.1:0    qemu       x86_64    4       4GiB      100GiB    /Users/suda/.lima/default
vz         Stopped    127.0.0.1:0    vz         x86_64    4       4GiB      100GiB    /Users/suda/.lima/vz

When the terminal is small, some columns (especially "DIR") can be just hidden.

@jandubois
Copy link
Member

One thing we could do to save some small amount of space would be to replace $HOME in "DIR" with ~:

$ limactl ls
NAME       STATUS     SSH            VM TYPE    ARCH      CPUS    MEMORY    DISK      DIR
default    Stopped    127.0.0.1:0    qemu       x86_64    4       4GiB      100GiB    ~/.lima/default
vz         Stopped    127.0.0.1:0    vz         x86_64    4       4GiB      100GiB    ~/.lima/vz

@jandubois
Copy link
Member

Another idea: check if all instances use the native arch (which I suspect will be true for most users), and drop the "ARCH" column if there are no emulated instances.

@AkihiroSuda
Copy link
Member Author

~

Yes, already opened a PR

@AkihiroSuda
Copy link
Member Author

Another idea: check if all instances use the native arch (which I suspect will be true for most users), and drop the "ARCH" column if there are no emulated instances.

SGTM

@afbjorklund
Copy link
Member

afbjorklund commented Nov 26, 2022

Some of these could probably be delegated to a "wide" option, ilke in kubectl ?

It would show all the columns, even if some of them are being hidden by default.

Probably my fault, for wanting to show resources (cpu/mem/disk) by default...

But I never found out what the "SSH" column is used for ? only has port, not key etc

@afbjorklund
Copy link
Member

afbjorklund commented Nov 26, 2022

drop the "ARCH" column if there are no emulated instances

Can do the same for vmtype, perhaps ? Hide it, if identical.

Especially if there is only one vmtype available, like on Linux.

@afbjorklund

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants