Skip to content

Conversation

SpiffyEight77
Copy link
Contributor

@SpiffyEight77 SpiffyEight77 commented Aug 5, 2025

Description

related Issue #3851

Adds --format flag support to nerdctl namespace ls command for custom output formatting.

Test

nerdctl namespace ls

nerdctl namespace ls
NAME       CONTAINERS    IMAGES    VOLUMES    LABELS
default    0             2         0          env=staging,region=us-west,team=frontend
moby       0             0         0

nerdctl namespace ls -q

nerdctl namespace ls -q
default
moby

nerdctl namespace ls -f '{{json .}}'

nerdctl namespace ls -f '{{json .}}'
{"Name":"default","Containers":0,"Images":2,"Volumes":0,"Labels":{"env":"staging","region":"us-west","team":"frontend"}}
{"Name":"moby","Containers":0,"Images":0,"Volumes":0,"Labels":null}

nerdctl namespace ls -f '{{json .}}' -q

nerdctl namespace ls -f '{{json .}}' -q
FATA[0000] format and quiet must not be specified together

@SpiffyEight77 SpiffyEight77 force-pushed the feat/namespace-ls-format-flag branch from ef14f6b to 3044e84 Compare August 5, 2025 09:06
@SpiffyEight77 SpiffyEight77 marked this pull request as draft August 5, 2025 09:08
@SpiffyEight77 SpiffyEight77 force-pushed the feat/namespace-ls-format-flag branch 2 times, most recently from f97d2ff to 483939a Compare August 5, 2025 09:16
@SpiffyEight77 SpiffyEight77 marked this pull request as ready for review August 5, 2025 09:18
@SpiffyEight77 SpiffyEight77 force-pushed the feat/namespace-ls-format-flag branch from 483939a to c56c49d Compare August 5, 2025 15:18
@AkihiroSuda AkihiroSuda added this to the v2.1.4 milestone Aug 6, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit ede9d26 into containerd:main Aug 18, 2025
75 of 84 checks passed
@SpiffyEight77 SpiffyEight77 deleted the feat/namespace-ls-format-flag branch August 18, 2025 01:58
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.

2 participants