[Toybox] [PATCH] ls: Ensure file names are separated by 2 spaces

Andrew Ilijic ilijic.andrew at gmail.com
Thu Oct 24 07:29:20 PDT 2019


Hi Rob,

> In theory there's an ls -w option that
> lets you set the width, but I never needed/implemented it. (Andrew: you're
> welcome to if you like.
I am going to take your advice and try to implement the `-w` argument.
It should make testing easier. Right now, I have to adjust the size of
my terminal to test certain things. After that, I am going to look at
the UTF-8 combining characters issue.

The closer I look at the `ls` command on my system, Debian, the
weirder it gets. For example, in a directory with many files,
redirecting `ls -C` or `ls -x` to a file, the Debian implementation
puts tabs in some places and spaces in others. I don't think that this
is a behavior that we want to emulate, or do we?

I found a link for POSIX `ls` and GNU `ls,` can you let me know if you
have any other resources? I am going to look at them to get an idea of
what is and isn't implementation-defined.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html#tag_20_73
https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html#ls-invocation



More information about the Toybox mailing list