mirror of
https://github.com/sxyazi/yazi.git
synced 2024-11-24 01:48:00 +03:00
feat: ownership linemode (#1238)
Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
parent
3c88edbc4d
commit
11547eefe0
@ -88,6 +88,7 @@ keymap = [
|
||||
{ on = [ "m", "s" ], run = "linemode size", desc = "Set linemode to size" },
|
||||
{ on = [ "m", "p" ], run = "linemode permissions", desc = "Set linemode to permissions" },
|
||||
{ on = [ "m", "m" ], run = "linemode mtime", desc = "Set linemode to mtime" },
|
||||
{ on = [ "m", "o" ], run = "linemode owner", desc = "Set linemode to owner" },
|
||||
{ on = [ "m", "n" ], run = "linemode none", desc = "Set linemode to none" },
|
||||
|
||||
# Copy
|
||||
|
@ -21,6 +21,9 @@ function Folder:linemode(area, files)
|
||||
spans[#spans + 1] = ui.Span(time and os.date("%y-%m-%d %H:%M", time // 1) or "")
|
||||
elseif mode == "permissions" then
|
||||
spans[#spans + 1] = ui.Span(f.cha:permissions() or "")
|
||||
elseif mode == "owner" then
|
||||
spans[#spans + 1] = ya.user_name and ui.Span(ya.user_name(f.cha.uid) .. ":" .. ya.group_name(f.cha.gid))
|
||||
or ui.Span("")
|
||||
end
|
||||
|
||||
spans[#spans + 1] = ui.Span(" ")
|
||||
|
Loading…
Reference in New Issue
Block a user