sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 73adeb415bd66aa86315355e84a4151c54ac3413
parent 5230eb2de370bafb6a148dc6d6b04f30f6309a0d
Author: Michael Forney <mforney@mforney.org>
Date:   Sat May 14 18:56:51 -0700

Revert "ls: only display directory headers when more than one directory is specified"

This reverts commit b107489bf2cda579ca53551206270b9eee80c059.

Diffstat:
ls.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ls.c b/ls.c @@ -53,7 +53,6 @@ static int Uflag = 0; static int uflag = 0; static int first = 1; static char sort = 0; -static size_t ds = 0; static void ls(const char *, const struct entry *, int); @@ -278,7 +277,7 @@ lsdir(const char *path, const struct entry *dir) if (!Uflag) qsort(ents, n, sizeof(*ents), entcmp); - if (ds > 1 && (path[0] || dir->name[0] != '.')) + if (path[0] || dir->name[0] != '.') printf("%s:\n", dir->name); for (i = 0; i < n; i++) output(&ents[i]); @@ -369,7 +368,7 @@ int main(int argc, char *argv[]) { struct entry ent, *dents, *fents; - size_t i, fs; + size_t i, ds, fs; ARGBEGIN { case '1':