# HG changeset patch # User Rob Landley # Date 1353017751 21600 # Node ID d2dde3d0ef05e16f83795ba7af95a8c252a0eef3 # Parent 786841fdb1e0b697367af9a9c29f038c8b820167 Make ls default to -C if no option specified and it's outputting to a tty. diff -r 786841fdb1e0 -r d2dde3d0ef05 toys/posix/ls.c --- a/toys/posix/ls.c Tue Nov 13 17:14:08 2012 -0600 +++ b/toys/posix/ls.c Thu Nov 15 16:15:51 2012 -0600 @@ -426,6 +426,7 @@ 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"