add get_entry_types API method to helpdb

develop
myk002 2022-08-05 22:06:02 -07:00
parent b3a2a10caa
commit 1a777257b4
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 5 additions and 3 deletions

@ -468,6 +468,10 @@ local function get_db_property(entry_name, property)
textdb[entrydb[entry_name].text_entry][property]
end
function ge_entry_types(entry)
return get_db_property(entry, 'entry_types')
end
-- returns the ~54 char summary blurb associated with the entry
function get_entry_short_help(entry)
return get_db_property(entry, 'short_help')
@ -637,9 +641,7 @@ function get_commands()
end
function is_builtin(command)
ensure_db()
return entrydb[command] and
get_db_property(command, 'entry_types')[ENTRY_TYPES.BUILTIN]
return is_entry(command) and get_entry_types(command)[ENTRY_TYPES.BUILTIN]
end
---------------------------------------------------------------------------