[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"ls" spacing between columns
From: |
Jordan Russell |
Subject: |
"ls" spacing between columns |
Date: |
Fri, 09 Apr 2004 12:37:02 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 |
Hi,
I've noticed that in the latest versions of "ls" (coreutils 5.x I
guess) there's only a single space separating the user, group, and file
size columns when the "-l" option is used. For example:
-rw------- 1 root root 861286 Apr 9 15:10 maillog
Personally, I find directory listings more difficult to read with those
columns packed together so tightly. Would it be possible to make it two
spaces instead (a la FreeBSD "ls")?
-rw------- 1 root root 861286 Apr 9 15:10 maillog
Patch (against today's CVS) follows.
Thanks,
Jordan Russell
Index: ls.c
===================================================================
RCS file: /cvsroot/coreutils/coreutils/src/ls.c,v
retrieving revision 1.352
diff -u -r1.352 ls.c
--- ls.c 2 Feb 2004 07:59:23 -0000 1.352
+++ ls.c 9 Apr 2004 19:45:32 -0000
@@ -2972,9 +2972,9 @@
{
char const *name = (numeric_ids ? NULL : getuser (u));
if (name)
- printf ("%-*s ", width, name);
+ printf ("%-*s ", width, name);
else
- printf ("%*lu ", width, (unsigned long int) u);
+ printf ("%*lu ", width, (unsigned long int) u);
dired_pos += width;
dired_pos++;
}
@@ -2986,9 +2986,9 @@
{
char const *name = (numeric_ids ? NULL : getgroup (g));
if (name)
- printf ("%-*s ", width, name);
+ printf ("%-*s ", width, name);
else
- printf ("%*lu ", width, (unsigned long int) g);
+ printf ("%*lu ", width, (unsigned long int) g);
dired_pos += width;
dired_pos++;
}
Re: "ls" spacing between columns, Jim Meyering, 2004/04/10