mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-02-04 06:32:03 +00:00
Update 2025-01-11
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user