[hackers] [sbase] Really force 1 entry per line with -1 in ls(1) || FRIGN

From: <git_AT_suckless.org>
Date: Wed, 2 Mar 2016 19:44:36 +0100 (CET)

commit 2d7d2261a06a293ef6e27ad964f6bfb41fca8728
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Wed Mar 2 11:28:18 2016 +0100
Commit: sin <sin_AT_2f30.org>
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
_AT_@ -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;
Received on Wed Mar 02 2016 - 19:44:36 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 02 2016 - 19:48:14 CET