On 05/03/2018 12:55 AM, enh wrote:
> i was surprised to see all the files in `ls` output indented by one
> space today. turns out that was because there was a file with a space
> in the name in that directory.

I worked out that the reason ls had two spaces between columns is if an entry
ends with a utf8 combining char it eats a trailing space to put an umlaut over
it or similar. So I should probably go back to minimum 2 spaces between columns.
(It's on the todo list.)

> /tmp/x$ touch 'hello.txt' 'hello world.txt'
> /tmp/x$ ls
>  hello.txt  'hello world.txt'
> /tmp/x$ ls -1
> hello.txt
> 'hello world.txt'

Huh. That's going to break a lot of scripts.

  $ while read a; do echo "$a"; break; done
  'one two'
  'one two'

Lovely.

> /tmp/x$ ls --quoting-style=
> ls: ambiguous argument ‘’ for ‘--quoting-style’
> Valid arguments are:
>   - ‘literal’
>   - ‘shell’
>   - ‘shell-always’
>   - ‘shell-escape’
>   - ‘shell-escape-always’
>   - ‘c’
>   - ‘c-maybe’
>   - ‘escape’
>   - ‘locale’
>   - ‘clocale’
> Try 'ls --help' for more information.
> /tmp/x$ ls --quoting-style=literal
> hello.txt  hello world.txt
> /tmp/x$ ls --quoting-style=shell
>  hello.txt  'hello world.txt'
> /tmp/x$ ls --quoting-style=c
> "hello.txt"  "hello world.txt"
> 
> i'm not sure what the default corresponds to. presumably "shell",
> which ought to have been "shell-maybe" to match "c-maybe"? (or "c"
> should have been "c-always" and "c-maybe" should have been "c"?
> another defeat snatched from the jaws of victory by the FSF... i
> wonder when they'll add the option so i can get shell and c quoting
> for the help text, rather than these left/right quotes?)

Are you proposing implementing this... change?

I haven't updated my ubuntu past 14.04 because it's the last LTS that didn't
have systemd in it, and I'm vaguely trying to get an android native development
environment working before that goes out of support. (Or else I'll have to move
to devuan or something...) So I haven't seen the recent stuff the FSF is doing
with itself.

I'm not tied to the current behavior (other than 30 years of inertia having a
certain amount of pull), but I'd object to implementing 37 selectable duplicate
codepaths most of which will never get significant regression testing, and I'd
prefer any new behavior make _sense_ rather than blindly copying whatever the
FSF's doing.

So if our behavior should change, what should it change _to_?

Rob

P.S. https://www.patreon.com/posts/job-change-and-18518050 in case you were
wondering what I've been up to.
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to