coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ls: add --sort=width (-W) option to sort by filename width


From: Pádraig Brady
Subject: Re: [PATCH] ls: add --sort=width (-W) option to sort by filename width
Date: Thu, 15 Apr 2021 22:10:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 15/04/2021 14:33, Carl Edquist wrote:
PS if you are willing to cheat a bit and treat the f->width member as
"mutable" (modifying it even when f is pointer to const), you could
simplify things a bit if you just store the value from quote_name_width()
in fileinfo_name_width().  Something like [1].

Yes that was my first iteration,
but it felt wrong to cast the const away in the presentation functions.
I think this way is more maintainable in future.

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]