Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion yazi-config/preset/theme-dark.toml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ rules = [
# Media
{ mime = "{audio,video}/*", fg = "magenta" },
# Archive
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "red" },
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzip,lz4,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "red" },
# Document
{ mime = "application/{pdf,doc,rtf}", fg = "cyan" },
# Virtual file system
Expand Down
2 changes: 1 addition & 1 deletion yazi-config/preset/theme-light.toml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ rules = [
# Media
{ mime = "{audio,video}/*", fg = "magenta" },
# Archive
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "red" },
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzip,lz4,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "red" },
# Document
{ mime = "application/{pdf,doc,rtf}", fg = "cyan" },
# Virtual file system
Expand Down
4 changes: 2 additions & 2 deletions yazi-config/preset/yazi-default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ rules = [
# Media
{ mime = "{audio,video}/*", use = [ "play", "reveal" ] },
# Archive
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] },
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzip,lz4,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] },
# JSON
{ mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] },
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
Expand Down Expand Up @@ -148,7 +148,7 @@ previewers = [
# PDF
{ 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/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzip,lz4,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" },
{ mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" },
{ url = "*.{AppImage,appimage}", run = "archive" },
# Virtual Disk / Disk Image
Expand Down
2 changes: 1 addition & 1 deletion yazi-plugin/preset/plugins/extract.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function M.tmp_name(url) return ".tmp_" .. ya.hash(string.format("extract//%s//%

function M.trim_ext(name)
-- stylua: ignore
local exts = { ["7z"] = true, apk = true, bz2 = true, bzip2 = true, cbr = true, cbz = true, exe = true, gz = true, gzip = true, iso = true, jar = true, rar = true, tar = true, tgz = true, xz = true, zip = true, zst = true }
local exts = { ["7z"] = true, apk = true, bz2 = true, bzip2 = true, cbr = true, cbz = true, exe = true, gz = true, gzip = true, iso = true, jar = true, lzip = true, lz = true, lz4 = true, rar = true, tar = true, tgz = true, xz = true, zip = true, zst = true }

while true do
local s = name:gsub("%.([a-zA-Z0-9]+)$", function(s) return (exts[s] or exts[s:lower()]) and "" end)
Expand Down
Loading