mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Shell: Sort CompletionSuggestions for paths lexicographically
This used to be ordered by inode, which can be surprising.
This commit is contained in:
committed by
Sam Atkins
parent
802cf9bc69
commit
0e901f8c68
@@ -1519,6 +1519,10 @@ Vector<Line::CompletionSuggestion> 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user