Update 2025-01-11

This commit is contained in:
2025-01-11 18:19:28 +02:00
parent 9ae599446b
commit f441d61eca
40 changed files with 845 additions and 587 deletions

View File

@@ -2,9 +2,14 @@
A plugin for [yazi](https://github.com/sxyazi/yazi) to calculate the size of the current selection or the current working directory (if no selection is made).
## Compatibility
- yazi `0.4.x` since commit `2780de5aeef1ed16d1973dd6e0cd4d630c900d56` ([link](https://github.com/pirafrank/what-size.yazi/commit/2780de5aeef1ed16d1973dd6e0cd4d630c900d56)).
- yazi `0.3.x` up to commit `f08f7f2d5c94958ac4cb66c51a7c24b4319c6c93` ([link](https://github.com/pirafrank/what-size.yazi/commit/f08f7f2d5c94958ac4cb66c51a7c24b4319c6c93)).
## Requirements
- `du`
- `du` on Linux. macOS and Windows support is planned.
## Installation

View File

@@ -43,9 +43,9 @@ local function format_size(size)
end
return {
entry = function(self, args)
entry = function(self, job)
-- defaults not to use clipboard, use it only if required by the user
local clipboard = args[1] == '--clipboard' or args[1] == '-c'
local clipboard = job.args.clipboard or job.args[1] == '-c'
local items = get_paths()
local cmd = "du"