Skip to content

Commit

Permalink
Issue #736: add help message to keyword search
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Nov 24, 2024
1 parent 8edf167 commit 77bb664
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
20 changes: 19 additions & 1 deletion rt/keyword/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
step 1
lua ProjectDIR/src/lmod.in.lua shell --regression_testing --version
===========================
Modules based on Lua: Version 8.7.16 2023-01-09 21:47 -06:00
Modules based on Lua: Version 8.7.53 2024-10-12 19:57 -05:00
by Robert McLay [email protected]
===========================
step 2
Expand All @@ -24,3 +24,21 @@ lua ProjectDIR/src/lmod.in.lua shell --regression_testing --terse keyword graph
parmetis/
parmetis/3.1
parmetis/4.0.1
===========================
step 4
lua ProjectDIR/src/lmod.in.lua shell --regression_testing keyword ICC_DIR
===========================
The following modules match your search criteria: "ICC_DIR"
intel: intel/intel
To learn more about a package execute:
$ module spider Foo
where "Foo" is the name of a module.
To find detailed information about a particular package you
must specify the version if there is more than one version:
$ module spider Foo/11.1
===========================
step 5
lua ProjectDIR/src/lmod.in.lua shell --regression_testing --terse keyword ICC_DIR
===========================
intel/
intel/intel
2 changes: 2 additions & 0 deletions rt/keyword/keyword.tdesc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ testdescript = {
runLmod --version # 1
runLmod keyword graph # 2
runLmod --terse keyword graph # 3
runLmod keyword ICC_DIR # 4
runLmod --terse keyword ICC_DIR # 5
HOME=$ORIG_HOME
Expand Down
16 changes: 16 additions & 0 deletions rt/keyword/out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,19 @@ MODULEPATH=ProjectDIR/rt/keyword/mf/Core;
export MODULEPATH;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/keyword/mf/Core",},systemBaseMPATH="ProjectDIR/rt/keyword/mf/Core",}';
export _ModuleTable_;
===========================
step 4
lua ProjectDIR/src/lmod.in.lua shell --regression_testing keyword ICC_DIR
===========================
MODULEPATH=ProjectDIR/rt/keyword/mf/Core;
export MODULEPATH;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/keyword/mf/Core",},systemBaseMPATH="ProjectDIR/rt/keyword/mf/Core",}';
export _ModuleTable_;
===========================
step 5
lua ProjectDIR/src/lmod.in.lua shell --regression_testing --terse keyword ICC_DIR
===========================
MODULEPATH=ProjectDIR/rt/keyword/mf/Core;
export MODULEPATH;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/keyword/mf/Core",},systemBaseMPATH="ProjectDIR/rt/keyword/mf/Core",}';
export _ModuleTable_;
3 changes: 2 additions & 1 deletion src/Spider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ function M.searchSpiderDB(self, strA, dbT, providedByT)
for fn, vv in pairs(vvv) do
local whatisS = concatTbl(vv.whatis or {},"\n"):lower()
local found = false
local help = vv.help or ""
for i = 1,strA.n do
local str = strA[i]
if (sn:find(str) or whatisS:find(str)) then
if (sn:find(str) or whatisS:find(str) or help:find(str)) then
found = true
break
end
Expand Down

0 comments on commit 77bb664

Please sign in to comment.