Source-Changes archive

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

Re: CVS commit: src/bin/ls



Jan Schaumann <jschauma%netbsd.org@localhost> writes:
> Module Name:  src
> Committed By: jschauma
> Date:         Sat Apr  8 22:28:06 UTC 2006
>
> Modified Files:
>       src/bin/ls: ls.1 util.c
>
> Log Message:
> Address PR 30374 as suggested in there:
>
> "Modify the man page to match the behaviour of "ls -q",
>
> (done by yamt@ previously)
>
> ...
> modify both the behaviour and documentation for "ls -b" and "ls -B" to
> make spaces readily apparent.  This could be done by adding VIS_WHITE
> to the flags passed to strvis(3) in the safe_print() function in
> src/bin/ls/util.c."
>
> 'ls -b' now yields foo\sbar (whitespace) foo\tbar (tab) foo\rbar (CR).
> 'ls -B' now yields foo\040bar foo\011bar foo\015bar.

Hrm. \s isn't read by the shell. "\ " is.

Having -b do things like "\ " means you can feed the output of ls -b
into the shell and actually get the right file even if it has spaces
etc. in it. I think that's a valuable application. Even C doesn't
parse \s so far as I know...

Perry



Home | Main Index | Thread Index | Old Index