-
Notifications
You must be signed in to change notification settings - Fork 710
Open
Description
After implementing the --yq
option I found that I would like to have a --filter EXPR
option, that would be equivalent to --yq 'select(EXPR)'
.
This alone doesn't seem worthwhile, but I would want --filter
to also work with --format table
and --format '{{GO-TMPL}}'
.
So you could do something like this:
❯ limactl ls --filter '.status == "Running"'
NAME STATUS SSH VMTYPE ARCH CPUS MEMORY DISK DIR
docker Running 127.0.0.1:60763 vz aarch64 4 4GiB 100GiB ~/.lima/docker
qemu Running 127.0.0.1:63754 qemu aarch64 4 4GiB 100GiB ~/.lima/qemu
The --filter
option can be specified multiple times, so you could have a limactl-ps
plugin that runs the command above (with "$@"
), and then use it like this:
❯ limactl ps -f '.config.vmType == "vz"'
NAME STATUS SSH VMTYPE ARCH CPUS MEMORY DISK DIR
docker Running 127.0.0.1:60763 vz aarch64 4 4GiB 100GiB ~/.lima/docker
Metadata
Metadata
Assignees
Labels
No labels