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 avail --no-indepth #150

Closed
xdelaruelle opened this issue Jan 22, 2018 · 2 comments
Closed

module avail --no-indepth #150

xdelaruelle opened this issue Jan 22, 2018 · 2 comments
Milestone

Comments

@xdelaruelle
Copy link
Collaborator

Some improvement on the module avail command. It is desirable to only get as result the default available names, not all the fully qualified names.

For instance, if you have a modulefile gcc/6.1.1, only returns gcc.

It should materialize through an option on module avail (something simpler than --i_only_want_to_see_the_default_names of course) and maybe also with an internal flag to set if this should be the default display mode.

This feature simplifies output in case of large modulefile catalog. It should also be used by shell completion scripts as in this case we only need to see the names of the current searching level.

This enhancement may also improve avail performances a bit, but not drastically as when we want to see modulefiles at level 1, it should go down level 2 to check there is at least one modulefile (to ensure directory has module-related content).

DevHints: should adapt findModules and getModules internal procedures to achieve this enhancement.

@cmarqu
Copy link
Contributor

cmarqu commented Apr 25, 2018

Maybe an option --show-levels could say how deep you want to display? This may be useful for people using more than one sub-level (i.e. we have tools/gcc/6.1.1 and projects/foo/0.9).

In your example, you would set --show-levels 1 to get gcc returned for gcc/6.1.1; I would set this to 2 to get all tool and project names.

@xdelaruelle xdelaruelle modified the milestones: 4.2, 4.3 Aug 31, 2018
@xdelaruelle xdelaruelle changed the title module avail --i_only_want_to_see_the_default_names module avail --no-indepth Dec 24, 2018
@xdelaruelle
Copy link
Collaborator Author

To clarify a bit, the idea is to get available modulefiles found at the same file depth level than the expressed query.

Say for instance we have the following modulefiles:

d
dir/1
dir/2

module avail --no-indepth or module avail --no-indepth d would return:

d
dir/

and modulefile avail --no-indepth dir/ would return:

dir/1
dir/2

@cmarqu: regarding your --show-levels proposal, I would prefer keeping this feature simple for the moment and only proposing a full depth search (with --indepth option, which is the default behavior) and a non-recursive/current depth search (with --no-indepth option)

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

No branches or pull requests

2 participants