fix: sort interactive cd candidates case-insensitively so short exact matches match first (#4066)

This commit is contained in:
三咲雅 misaki masa 2026-06-20 11:15:40 +08:00 committed by GitHub
parent 0daa5df644
commit ef5db6e257
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@ impl Actor for Trigger {
if !cache.is_empty() {
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 });
}