projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aa651a
)
Make ls default to -C if no option specified and it's outputting to a tty.
author
Rob Landley
<rob@landley.net>
Thu, 15 Nov 2012 22:15:51 +0000
(16:15 -0600)
committer
Rob Landley
<rob@landley.net>
Thu, 15 Nov 2012 22:15:51 +0000
(16:15 -0600)
toys/posix/ls.c
patch
|
blob
|
history
diff --git
a/toys/posix/ls.c
b/toys/posix/ls.c
index
201c7e2
..
70200e7
100644
(file)
--- 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"