From 8b9f64c9768ee854ff79f308e1db5169ee0cedd7 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Mon, 18 Mar 2013 14:01:18 +0100 Subject: [PATCH] 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 --- local/e2-help.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 2.39.5