fix(ls): place dot dirs on top in version sorting

Also fixes the fact that version sorting had incorrect edge cases due to wrong name passing.
This commit is contained in:
Guillem L. Jara
2026-05-01 15:09:49 +02:00
committed by Daniel Hofstetter
parent e4a2ab3955
commit f774940451
2 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -3661,7 +3661,7 @@ fn test_ls_version_sort() {
);
let result = scene.ucmd().arg("-a1v").succeeds();
expected.insert(expected.len() - 1, "..");
expected.insert(0, "..");
expected.insert(0, ".");
assert_eq!(
result.stdout_str().split('\n').collect::<Vec<_>>(),