Skip to content

fix: add canonical ls subcommand to image and container groups#27

Merged
us merged 3 commits into
us:mainfrom
jahirvidrio:fix/image-container-ls-subcommand
Jun 19, 2026
Merged

fix: add canonical ls subcommand to image and container groups#27
us merged 3 commits into
us:mainfrom
jahirvidrio:fix/image-container-ls-subcommand

Conversation

@jahirvidrio

Copy link
Copy Markdown
Contributor

Closes #26


Adds ls as the canonical list subcommand in the image and container groups,
keeping images / ps as visible aliases so nothing breaks.

What changed

  • image / container groups: ls is now the canonical subcommand and group default; images / ps stay as visible aliases.
  • List flags + logic moved into shared ImageListOptions / ContainerListOptions (@OptionGroup), so the group ls and the top-level shortcut share one source of truth.
  • Top-level mocker images / mocker ps unchanged (MockerCLI.swift untouched) — they remain the Docker top-level shortcuts.

jahirvidrio and others added 3 commits June 18, 2026 17:08
Implement the previously-dead image list flags so `image ls` reaches
parity with `container ls`:
- --filter (reference, label), --format, --no-trunc now apply.
- --all/--digests/--tree stay accepted no-ops (no backing data).

Fix container --latest/--last to include all states regardless of
--all, as Docker does and as the flag help already promises.

Extract the filter/format logic into pure, unit-tested helpers.
@us

us commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Thanks a lot for this, @jahirvidrio! 🙌 Spot-on fix for the ls disparity, and extracting the shared *ListOptions was exactly the right call.

I pushed a small follow-up on top:

  • Wired up the image list flags that were being parsed but ignored, so image ls now honors --filter (reference/label), --format, and --no-trunc — matching container ls.
  • Fixed container ls --latest/--last to include all states (as Docker does, and as the flag help already promised).
  • Pulled the filter/format logic into pure helpers with unit tests.

Flags with no backing data (--digests, --tree, --size) stay as accepted no-ops for Docker compatibility. Merging once CI is green — thanks again for contributing! 🚀

@us us merged commit e1aa122 into us:main Jun 19, 2026
1 check passed
@jahirvidrio jahirvidrio deleted the fix/image-container-ls-subcommand branch June 19, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: 'image ls' and 'container ls' are missing (Docker-CLI disparity)

2 participants