Re: [dev] [ls] [PATCH] ls implementation or -R -C -q -u (WIP: please help test)

From: Alexandre Niveau <alexandre.niveau_AT_gmail.com>
Date: Sun, 15 Feb 2015 15:43:38 +0100

> ls -q replaces non printable characters with '?'; I'm not sure how to
> make files with non-printable characters as yet,

touch "$(printf 'foo\nbar')"
touch "this $(tput setaf 1) is red"

You can also use Control+V to enter the next character literally (tab,
CR, backspace, etc.).

> all I know is this
> code path works with input that does not have non-printable
> characters.

It does not work for me, all characters are replaced by ? (well, except
without the -l flag, but that's because you forgot an “ent->name” on
line 357).

I think “*p++ = *n++;” on line 344 should be “*n++ = *p++;”, but that's
not the only problem. “isprintrune(r)” seems to always return 0.
Received on Sun Feb 15 2015 - 15:43:38 CET

This archive was generated by hypermail 2.3.0 : Sun Feb 15 2015 - 15:48:11 CET