feat: state now accepts a name for the bucket

This commit is contained in:
sxyazi 2024-02-21 02:28:41 +08:00
parent ed22be731a
commit 0cb572a837
No known key found for this signature in database

View file

@ -21,5 +21,5 @@ state = setmetatable({}, {
cache[bucket] = cache[bucket] or {}
cache[bucket][k] = v
end,
__call = function() return setmetatable({ __yazi_bucket = YAZI_PLUGIN_NAME }, sub_mt) end,
__call = function(_, name) return setmetatable({ __yazi_bucket = name or YAZI_PLUGIN_NAME }, sub_mt) end,
})