Skip to content

Conversation

@vvoland
Copy link
Collaborator

@vvoland vvoland commented Nov 13, 2025

Previously when no terminal was attached the width was assumed to be 80.
This is too short for most image names which truncated the names when output was redirect (for example to grep).

This disabled the name truncation if the terminal width can't be determined.

`docker image ls` no longer truncates the name width when output is redirect (e.g. for `grep`).

@vvoland vvoland added this to the 29.0.1 milestone Nov 13, 2025
@vvoland vvoland self-assigned this Nov 13, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/image/tree.go 82.35% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

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

Looks good, except for ...

Previously when no terminal was attached the width was assumed to be 80.
This is too short for most image names which truncated the names when
output was redirect (for example to `grep`).

This disabled the name truncation if the terminal width can't be
determined.

Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland vvoland force-pushed the img-list-notty-width branch from f9f612d to ed281dd Compare November 13, 2025 12:00
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 2ae51e2 into docker:master Nov 13, 2025
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants