[Toybox] ls (/-b/-q) (/on a tty)

Rob Landley rob at landley.net
Fri Dec 8 19:16:21 PST 2017


On 12/08/2017 08:27 PM, Josh Gao wrote:
> On Fri, Dec 8, 2017 at 6:12 PM, Rob Landley <rob at landley.net
> <mailto:rob at landley.net>> wrote:
> 
>     I dunno about "wrong", but I agree it's not what ubuntu's does.
>     Posix-2008 is ambivalent:
> 
>       -q  Force each instance of non-printable filename characters and
>           <tab> characters to be written as the <question-mark> ( '?' )
>           character. Implementations may provide this option by default
>           if the output is to a terminal device.
> 
> 
> POSIX 2008 defines 'printable character' as explicitly including space:
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_287
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01

Indeed, I'm not saying -q is implemented wrong, just that -q as the
default for tty output is questionable if you want an unambiguous
representation.

That said, if you have a sufficiently strong preference...

Rob



More information about the Toybox mailing list