summaryrefslogtreecommitdiff
path: root/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'ls.c')
-rw-r--r--ls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ls.c b/ls.c
index feeccb7..d15288f 100644
--- a/ls.c
+++ b/ls.c
@@ -17,6 +17,7 @@
*
*/
+#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -541,6 +542,10 @@ main (int argc, char **argv)
return 1;
}
}
+
+ if (!isatty(STDOUT_FILENO)) {
+ display = SINGLE;
+ }
if (optind >= argc) {
strcpy(dirlist[0].path, ".");