From: Tobias Ulmer Date: Mon, 18 Mar 2013 13:01:18 +0000 (+0100) Subject: Remove regexp matching for manpages X-Git-Tag: e2factory-2.3.13rc5~2 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=8b9f64c9768ee854ff79f308e1db5169ee0cedd7;p=e2factory.git Remove regexp matching for manpages Pretty silly, seems to be a left-over from a previous iteration of the code. In addition, don't mention anything about sections as there is no support for matching them (yet). We do not have manpages with the same name in both sections, so it's not a problem for now. Signed-off-by: Tobias Ulmer --- diff --git a/local/e2-help.lua b/local/e2-help.lua index f6e6b1b..bc89176 100644 --- a/local/e2-help.lua +++ b/local/e2-help.lua @@ -202,11 +202,10 @@ end local function display_doc(documentation, doc_name) local rc, re, e - local doc_re_match = string.format("^%s$", doc_name) local found = 0 local founddoc for _,doc in ipairs(documentation) do - if doc.displayname:match(doc_re_match) then + if doc.displayname == doc_name then found = found + 1; founddoc = doc end @@ -221,8 +220,7 @@ local function display_doc(documentation, doc_name) e2lib.bomb(string.format("unhandled doctype: %d", founddoc.doctype)) end else - return false, err.new("More than one document found for '%s',".. - " specify a section", doc_name) + return false, err.new("More than one document matches '%s'", doc_name) end return true