commit 2d7d2261a06a293ef6e27ad964f6bfb41fca8728
Author: FRIGN <[email protected]>
AuthorDate: Wed Mar 2 11:28:18 2016 +0100
Commit: sin <[email protected]>
CommitDate: Wed Mar 2 18:44:32 2016 +0000
Really force 1 entry per line with -1 in ls(1)
if a filename contains a \n, it would not be limited to one line.
We use the qflag to replace the control characters with '?'s.
diff --git a/ls.c b/ls.c
index 7c97558..3268a99 100644
--- a/ls.c
+++ b/ls.c
@@ -369,7 +369,8 @@ main(int argc, char *argv[])
ARGBEGIN {
case '1':
- /* ignore */
+ /* force output to 1 entry per line */
+ qflag = 1;
break;
case 'A':
Aflag = 1;