diff options
author | Rob Landley <rob@landley.net> | 2012-11-15 16:15:51 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2012-11-15 16:15:51 -0600 |
commit | 02261e8082b9b098b20a4291fc2583f3c41db8d2 (patch) | |
tree | 1bd772a2184d205240aba279854fe67bea8b8d0d | |
parent | 7aa651a6a4496d848f86de9b1e6b3a003256a01f (diff) | |
download | toybox-02261e8082b9b098b20a4291fc2583f3c41db8d2.tar.gz |
Make ls default to -C if no option specified and it's outputting to a tty.
-rw-r--r-- | toys/posix/ls.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c index 201c7e24..70200e7c 100644 --- a/toys/posix/ls.c +++ b/toys/posix/ls.c @@ -426,6 +426,7 @@ void ls_main(void) else { TT.screen_width = 80; terminal_size(&TT.screen_width, NULL); + if (!(toys.optflags&(FLAG_1|FLAG_x|FLAG_m))) toys.optflags |= FLAG_C; } // The optflags parsing infrastructure should really do this for us, // but currently it has "switch off when this is set", so "-dR" and "-Rd" |