Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module keyword does not search module help, as documented #736

Open
malcook opened this issue Nov 22, 2024 · 2 comments
Open

module keyword does not search module help, as documented #736

malcook opened this issue Nov 22, 2024 · 2 comments

Comments

@malcook
Copy link
Contributor

malcook commented Nov 22, 2024

Notes

I read in your documentation about module keyword that:

This will search any help message or whatis description for the word(s) given on the command line.

But I find that it does not search the content of lua help at all.

Example:

$ module spider git

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  git: git/2.38.1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Description:
      Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.


    This module can be loaded directly: module load git/2.38.1

    Help:
       This module exposes the following command(s):
         - git-receive-pack
         - scalar
         - git
         - git-shell
         - git-upload-archive
         - git-subtree
         - git-upload-pack
         - git-cvsserver

so far, so good. I can search for something in the 'whatis' section of the .lua file just fine:

$ module keyword "distributed version"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following modules match your search criteria: "distributed version"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  git: git/2.38.1
    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.


however, searching for something in the "help" section fails:

$ module keyword git-subtree
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following modules match your search criteria: "git-subtree"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Might this be a configuration issue on my side, or is the documentation incorrect?

I am running

$ module --version

Modules based on Lua: Version 8.7.49 2024-08-30 13:55 -06:00
    by Robert McLay [email protected]

I have developed a workaround using ripgrep, but feel this is worth reporting.

@rtmclay
Copy link
Member

rtmclay commented Nov 25, 2024

Thanks for the bug report. I have modified the IS690-hide branch to provide a fix for this. Please test this branch to see if it works for you.

@malcook
Copy link
Contributor Author

malcook commented Nov 25, 2024

Thanks!

My own quick review suggests that the change of line 252 in Spider.lua should prove to be exactly what I hoped for.

However, I don't think I can easily test it myself now, but I have advised my site admin of the availability of change. He may chime in here.

I look forward to the release. It will make a big difference to me and my colleagues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants