List usernames next to entries
This commit is contained in:
parent
bb727acc1d
commit
e0af56ae0b
11
prpw-tui
11
prpw-tui
@ -234,7 +234,16 @@ local function searchByName()
|
||||
for i,entry in pairs(env.xmlFindTags(env.db,"entries")[1].children) do
|
||||
if string.find(string.lower(entry.attrs.name),name) ~= nil then
|
||||
table.insert(entries,function() manageEntry(entry) end)
|
||||
table.insert(entriesMenu,entry.attrs.name)
|
||||
local username = nil
|
||||
pcall(function()
|
||||
username = env.run({"field_get",entry.attrs.id,"username"})
|
||||
end)
|
||||
|
||||
local output = entry.attrs.name
|
||||
if username ~= nil then
|
||||
output = output .. " (" .. username .. ")"
|
||||
end
|
||||
table.insert(entriesMenu,output)
|
||||
end
|
||||
end
|
||||
emenu("Found entries:",entriesMenu,entries)
|
||||
|
Loading…
Reference in New Issue
Block a user