From 2d7d2261a06a293ef6e27ad964f6bfb41fca8728 Mon Sep 17 00:00:00 2001 From: FRIGN Date: Wed, 2 Mar 2016 11:28:18 +0100 Subject: [PATCH] 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. --- ls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;