Update 2025-04-16

Update 2025-04-07

Update 2025-04-12

Update 2025-04-16
This commit is contained in:
2025-04-05 13:06:19 +03:00
parent f298468e99
commit 1077cee297
19 changed files with 369 additions and 261 deletions

View File

@@ -10,7 +10,12 @@
## Installation
If you use Yazi from latest main branch
### Yazi package manager
```bash
ya pack -a ndtoan96/ouch
```
### Git
```bash
# Linux/macOS
git clone https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi
@@ -22,18 +27,6 @@ git clone https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugin
git clone https://github.com/ndtoan96/ouch.yazi.git "$($env:APPDATA)\yazi\config\plugins\ouch.yazi"
```
If you use Yazi < 0.4.3
```bash
# Linux/macOS
git clone --branch v0.4.0 --single-branch https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi
# Windows with cmd
git clone --branch v0.4.0 --single-branch https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugins\ouch.yazi
# Windows with powershell
git clone --branch v0.4.0 --single-branch https://github.com/ndtoan96/ouch.yazi.git "$($env:APPDATA)\yazi\config\plugins\ouch.yazi"
```
Make sure you have [ouch](https://github.com/ouch-org/ouch) installed and in your `PATH`.
## Usage
@@ -64,11 +57,13 @@ For compession, add this to your `keymap.toml`:
```toml
[[manager.prepend_keymap]]
on = ["C"]
run = "plugin ouch --args=zip"
run = "plugin ouch"
desc = "Compress with ouch"
```
The `--args=zip` part tells the plugin that default format is `zip`. You can change that to whatever format you want.
The plugin uses `zip` format by default. You can change the format when you name the output file, `ouch` will detect format based on file extension.
And, for example, if you would like to set `7z` as default format, you can use `plugin ouch 7z`.
### Decompression
This plugin does not provide a decompression feature because it already is supported by Yazi.

View File

@@ -112,6 +112,9 @@ end
function M:entry(job)
local default_fmt = job.args[1]
if default_fmt == nil then
default_fmt = "zip"
end
ya.manager_emit("escape", { visual = true })