diff --git a/commands/ls.c b/commands/ls.c index 278a8bc..070aa90 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -68,7 +68,7 @@ if (stat(tmp, &s)) goto out; if (flags & LS_COLUMN) - string_list_add(&sl, d->d_name); + string_list_add_sorted(&sl, d->d_name); else ls_one(d->d_name, &s); } @@ -156,7 +156,7 @@ if (!(s.st_mode & S_IFDIR)) { if (flags & LS_COLUMN) - string_list_add(&sl, argv[o]); + string_list_add_sorted(&sl, argv[o]); else ls_one(argv[o], &s); }