ouch.yazi
Features
- Archive preview
- Compression
Installation
Yazi package manager
ya pkg add ndtoan96/ouchGit
# Linux/macOS
git clone https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yaziWindows with cmd
git clone https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugins\ouch.yaziWindows with powershell
git clone https://github.com/ndtoan96/ouch.yazi.git "$($env:APPDATA)\yazi\config\plugins\ouch.yazi"Make sure you have ouch installed and in your PATH.
Usage
Preview
For archive preview, add this to youryazi.toml:[[plugin.prepend_previewers]]
mime = "application/{zip,tar,bzip2,7z,rar,xz,zstd,java-archive}"
run = "ouch"Now go to an archive on Yazi, you should see the archive's content in the preview pane. You can use J and K to scroll up and down the preview.
#### Customization
Previews can be customized by adding extra arguments in the run string:
[plugin]
prepend_previewers = [
# Change the top-level archive icon
{ ..., run = "ouch --archive-icon='🗄️ '" },
# Or remove it by setting it to ''
{ ..., run = "ouch --archive-icon=''" }, # Enable file icons
{ ..., run = "ouch --show-file-icons" },
# Disable tree view
{ ..., run = "ouch --list-view" },
# These can be combined
{ ..., run = "ouch --archive-icon='🗄️ ' --show-file-icons --list-view" },
]
Compression
For compression, add this to yourkeymap.toml:[[mgr.prepend_keymap]]
on = ["C"]
run = "plugin ouch"
desc = "Compress with ouch"The plugin uses the zip format by default. You can change the format when you name the output file; ouch will detect the format based on the file extension.
And, for example, if you would like to set 7z as the default format, you can use plugin ouch 7z.
Decompression
This plugin does not provide a decompression feature because it is already supported by Yazi. To decompress withouch, configure the opener in yazi.toml.[opener]
extract = [
{ run = 'ouch d -y %*', desc = "Extract here with ouch", for = "windows" },
{ run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" },
]--- Tranlated By Open Ai Tx | Last indexed: 2026-02-28 ---