diff --git a/yazi-config/preset/yazi-default.toml b/yazi-config/preset/yazi-default.toml index da1f2ae10..dd0f24053 100644 --- a/yazi-config/preset/yazi-default.toml +++ b/yazi-config/preset/yazi-default.toml @@ -132,9 +132,7 @@ previewers = [ { mime = "application/pdf", run = "pdf" }, # Archive { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" }, - { mime = "application/{debian-package,redhat-package-manager,rpm}", run = "archive" }, - { mime = "application/debian.binary-package", run = "archive" }, - { mime = "application/android.package-archive", run = "archive" }, + { mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" }, { name = "*.{AppImage,appimage}", run = "archive" }, # Virtual Disk / Disk Image { mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" }, diff --git a/yazi-core/src/tab/commands/sort.rs b/yazi-core/src/tab/commands/sort.rs index efcd8c957..15c1aa07f 100644 --- a/yazi-core/src/tab/commands/sort.rs +++ b/yazi-core/src/tab/commands/sort.rs @@ -7,10 +7,10 @@ use yazi_shared::event::CmdCow; use crate::{tab::Tab, tasks::Tasks}; impl Tab { - pub fn sort(&mut self, mut c: CmdCow, tasks: &Tasks) { + pub fn sort(&mut self, c: CmdCow, tasks: &Tasks) { let pref = &mut self.pref; - if let Some(by) = c.take_first_str() { - pref.sort_by = SortBy::from_str(&by).unwrap_or_default(); + if let Some(by) = c.first_str() { + pref.sort_by = SortBy::from_str(by).unwrap_or_default(); } pref.sort_reverse = c.maybe_bool("reverse").unwrap_or(pref.sort_reverse); @@ -19,6 +19,8 @@ impl Tab { pref.sort_translit = c.maybe_bool("translit").unwrap_or(pref.sort_translit); self.apply_files_attrs(); + + ManagerProxy::hover(None, self.id); ManagerProxy::update_paged(); tasks.prework_sorted(&self.current.files);