Hey Andrew Relating to combining char "issue" did you see patch I send to list.
http://lists.landley.net/pipermail/toybox-landley.net/2019-October/011076.html I would say that crunch_str() on lib cuts strings with combining chars already works correctly, and properly implemented terminal client like xterm renders them ok. And even if user has broken terminal combining chars should be pushed after main glyph, since there might be use case that user wants to clip his program output at 80 columns and push it to file and later render file with program that works such as web browser.... Then again there is probably lots of toys in toybox that does not use crunch_str and have there own logic where to clip string.... and need lots of testing. br Jarno On Thu, Oct 24, 2019 at 5:34 PM Andrew Ilijic <ilijic.and...@gmail.com> wrote: > > 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 > _______________________________________________ > Toybox mailing list > Toybox@lists.landley.net > http://lists.landley.net/listinfo.cgi/toybox-landley.net _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net