|
|
@ -159,7 +159,7 @@ xplr.config.general.logs.error.style = { fg = "Red" }
|
|
|
|
xplr.config.general.table.header.cols = {
|
|
|
|
xplr.config.general.table.header.cols = {
|
|
|
|
{ format = " index", style = {} },
|
|
|
|
{ format = " index", style = {} },
|
|
|
|
{ format = "╭─── path", style = {} },
|
|
|
|
{ format = "╭─── path", style = {} },
|
|
|
|
{ format = "permissions", style = {} },
|
|
|
|
{ format = "perm", style = {} },
|
|
|
|
{ format = "size", style = {} },
|
|
|
|
{ format = "size", style = {} },
|
|
|
|
{ format = "modified", style = {} },
|
|
|
|
{ format = "modified", style = {} },
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2759,62 +2759,23 @@ end
|
|
|
|
|
|
|
|
|
|
|
|
-- Renders the third column in the table
|
|
|
|
-- Renders the third column in the table
|
|
|
|
xplr.fn.builtin.fmt_general_table_row_cols_2 = function(m)
|
|
|
|
xplr.fn.builtin.fmt_general_table_row_cols_2 = function(m)
|
|
|
|
local green = { fg = "Green" }
|
|
|
|
local r = xplr.util.paint("r", { fg = "Green" })
|
|
|
|
local yellow = { fg = "Yellow" }
|
|
|
|
local w = xplr.util.paint("w", { fg = "Yellow" })
|
|
|
|
local red = { fg = "Red" }
|
|
|
|
local x = xplr.util.paint("x", { fg = "Red" })
|
|
|
|
|
|
|
|
local s = xplr.util.paint("s", { fg = "Red" })
|
|
|
|
local function bit(x, color, cond)
|
|
|
|
local S = xplr.util.paint("S", { fg = "Red" })
|
|
|
|
if cond then
|
|
|
|
local t = xplr.util.paint("t", { fg = "Red" })
|
|
|
|
return xplr.util.paint(x, color)
|
|
|
|
local T = xplr.util.paint("T", { fg = "Red" })
|
|
|
|
else
|
|
|
|
|
|
|
|
return xplr.util.paint("-", color)
|
|
|
|
return xplr.util
|
|
|
|
end
|
|
|
|
.permissions_rwx(m.permissions)
|
|
|
|
end
|
|
|
|
:gsub("r", r)
|
|
|
|
|
|
|
|
:gsub("w", w)
|
|
|
|
local p = m.permissions
|
|
|
|
:gsub("x", x)
|
|
|
|
|
|
|
|
:gsub("s", s)
|
|
|
|
local r = ""
|
|
|
|
:gsub("S", S)
|
|
|
|
|
|
|
|
:gsub("t", t)
|
|
|
|
r = r .. bit("r", green, p.user_read)
|
|
|
|
:gsub("T", T)
|
|
|
|
r = r .. bit("w", yellow, p.user_write)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if p.user_execute == false and p.setuid == false then
|
|
|
|
|
|
|
|
r = r .. bit("-", red, p.user_execute)
|
|
|
|
|
|
|
|
elseif p.user_execute == true and p.setuid == false then
|
|
|
|
|
|
|
|
r = r .. bit("x", red, p.user_execute)
|
|
|
|
|
|
|
|
elseif p.user_execute == false and p.setuid == true then
|
|
|
|
|
|
|
|
r = r .. bit("S", red, p.user_execute)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
r = r .. bit("s", red, p.user_execute)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r = r .. bit("r", green, p.group_read)
|
|
|
|
|
|
|
|
r = r .. bit("w", yellow, p.group_write)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if p.group_execute == false and p.setuid == false then
|
|
|
|
|
|
|
|
r = r .. bit("-", red, p.group_execute)
|
|
|
|
|
|
|
|
elseif p.group_execute == true and p.setuid == false then
|
|
|
|
|
|
|
|
r = r .. bit("x", red, p.group_execute)
|
|
|
|
|
|
|
|
elseif p.group_execute == false and p.setuid == true then
|
|
|
|
|
|
|
|
r = r .. bit("S", red, p.group_execute)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
r = r .. bit("s", red, p.group_execute)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r = r .. bit("r", green, p.other_read)
|
|
|
|
|
|
|
|
r = r .. bit("w", yellow, p.other_write)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if p.other_execute == false and p.setuid == false then
|
|
|
|
|
|
|
|
r = r .. bit("-", red, p.other_execute)
|
|
|
|
|
|
|
|
elseif p.other_execute == true and p.setuid == false then
|
|
|
|
|
|
|
|
r = r .. bit("x", red, p.other_execute)
|
|
|
|
|
|
|
|
elseif p.other_execute == false and p.setuid == true then
|
|
|
|
|
|
|
|
r = r .. bit("T", red, p.other_execute)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
r = r .. bit("t", red, p.other_execute)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return r
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- Renders the fourth column in the table
|
|
|
|
-- Renders the fourth column in the table
|
|
|
|