]> git.e2factory.org Git - e2factory.git/commitdiff
Remove regexp matching for manpages
authorTobias Ulmer <tu@emlix.com>
Mon, 18 Mar 2013 13:01:18 +0000 (14:01 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 18 Mar 2013 13:01:18 +0000 (14:01 +0100)
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 <tu@emlix.com>
local/e2-help.lua

index f6e6b1b5942797dbf483f03c400017b8b806083a..bc891764bd61477958560841737bd58a0b35bc86 100644 (file)
@@ -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