fix: sort interactive cd candidates case-insensitively so short exact matches match first

This commit is contained in:
sxyazi 2026-06-20 11:15:02 +08:00
parent 0daa5df644
commit 5a12bf6bfe
No known key found for this signature in database

View file

@ -53,7 +53,7 @@ impl Actor for Trigger {
if !cache.is_empty() { if !cache.is_empty() {
cache cache
.sort_unstable_by(|a, b| natsort(a.name.encoded_bytes(), b.name.encoded_bytes(), false)); .sort_unstable_by(|a, b| natsort(a.name.encoded_bytes(), b.name.encoded_bytes(), true));
CmpProxy::show(CmpOpt { cache, cache_name: parent, word, ticket }); CmpProxy::show(CmpOpt { cache, cache_name: parent, word, ticket });
} }