Skip to content

ls: [cleanup] each column to keep track of its own width #11790

@egmontkob

Description

@egmontkob

From #10980 (comment):


I find it really unclean, hacky code that if there's more space needed for the permissions (due to some ACLs) then you keep track of it by increasing the padding of link count, the next field.

Such approach is semantically bad, and will break if you ever add various other output formats (let alone the possibility of user-defined list of columns).

In clean code, each property should keep track of its own required width.

Maybe you want to refactor this part?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions