From 2515756d1da67b24fb7f36db99b274eeee3704d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 16 Jul 2024 11:11:12 -0700 Subject: [PATCH] case insensitive name sorting --- internal/files/files.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/files/files.go b/internal/files/files.go index 8bdd63c..b871d09 100644 --- a/internal/files/files.go +++ b/internal/files/files.go @@ -49,7 +49,9 @@ func SortBySizeReverse(a, b File) int { } func SortByName(a, b File) int { - return cmp.Compare(a.Name(), b.Name()) + an := strings.ToLower(a.Name()) + bn := strings.ToLower(b.Name()) + return cmp.Compare(an, bn) } func SortByNameReverse(a, b File) int {