diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 649ceb2dc..c332933a2 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -3133,7 +3133,10 @@ static int internal_getCommandHelp(lua_State *L) { help += "."; } - help += "\n" + pc.usage; + if (pc.usage.size()) + { + help += "\n" + pc.usage; + } lua_pushstring(L, help.c_str()); return 1; } diff --git a/library/include/PluginManager.h b/library/include/PluginManager.h index f168d7e47..79b7e0492 100644 --- a/library/include/PluginManager.h +++ b/library/include/PluginManager.h @@ -97,6 +97,10 @@ namespace DFHack /// create a command with a name, description, function pointer to its code /// and saying if it needs an interactive terminal /// Most commands shouldn't require an interactive terminal! + /// Note that the description and usage fields are only used for + /// out-of-tree plugins that do not have rendered help installed in + /// the hack/docs directory. Help for all internal plugins comes from + /// the rendered .rst files. PluginCommand(const char * _name, const char * _description, command_function function_,