fix(ndcli): add tree view for list containers#304
Open
theinig wants to merge 2 commits into
Open
Conversation
Add a Unicode tree rendering mode to `list containers` with: - `-T/--tree` to switch output to a visual tree - `-p/--pattern` to filter tree output by regex - `-c/--case-sensitive` for exact matching - `--no-color` to disable ANSI highlighting Keep the existing flat output path unchanged when tree mode is not requested. When filtering is enabled, retain matching nodes, their ancestors, and their child subtrees so the rendered tree preserves context. Co-authored-by: GitHub Copilot (GPT-5.4 mini) <github-copilot@openai.com> Signed-off-by: Torsten Heinig <torsten.heinig@ionos.com>
Collaborator
|
Please review CONTRIBUTING.md
|
Add dim-testsuite/t/container-list-tree.t, the integration test required by CONTRIBUTING.md for the feature shipped in f9721e5 (fix(ndcli): add tree view for list containers). The test covers all four new flags of `ndcli list containers`: - --tree / -T: Unicode box-drawing rendering (└──, ├──, │ ) verified for single-container (└── only) and multi-container layouts (├── + │ prefix for non-last; └── + spaces for last). - --pattern / -p: regex filter retains matching nodes with all their children and their ancestor path; unmatched subtrees are pruned (10.x block is dropped when pattern is "11"). - --case-sensitive / -c: confirmed that lowercase "container" does not match "(Container)" and that WARNING is emitted with no output. - --no-color: flag accepted without error; ANSI codes are already suppressed for non-tty stdout, output is identical to -T alone. Also removes a stray trailing space on a blank line in ndcli/dimcli/__init__.py left over from the feature commit. Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Torsten Heinig <torsten.heinig@ionos.com>
Author
|
dim-testsuite/t/container-list-tree.t added to the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a Unicode tree rendering mode to
list containerswith:-T/--treeto switch output to a visual tree-p/--patternto filter tree output by regex-c/--case-sensitivefor exact matching--no-colorto disable ANSI highlightingKeep the existing flat output path unchanged when tree mode is not requested. When filtering is enabled, retain matching nodes, their ancestors, and their child subtrees so the rendered tree preserves context.