From 2b50909946cd4fcc141f1fe14c8f47c976c8fd3d Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sun, 26 Jul 2020 13:48:06 -0400 Subject: [PATCH] ls() is sorted; Fixes #58 --- Sources/Path+ls.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Path+ls.swift b/Sources/Path+ls.swift index ce29a1b..469a2a6 100644 --- a/Sources/Path+ls.swift +++ b/Sources/Path+ls.swift @@ -164,7 +164,7 @@ public extension Pathish { if options != .a, path.basename().hasPrefix(".") { return nil } // ^^ we don’t use the Foundation `skipHiddenFiles` because it considers weird things hidden and we are mirroring `ls` return path - } + }.sorted() } /// Recursively find files under this path. If the path is a file, no files will be found.