diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index add8fb4977..bb3aad9f42 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -1519,6 +1519,10 @@ Vector Shell::complete_path(StringView base, StringV } } + // The results of DirIterator are in the order they appear on-disk. + // Instead, return suggestions in lexicographical order. + quick_sort(suggestions, [](auto& a, auto& b) { return a.text_string < b.text_string; }); + return suggestions; }