Update sgr procedure to render multiple other keys applying to the
string, by applying each of these keys to a sub part of string, yet
mixing with matching sub string highlight.
When tags apply to a module to display, apply to this module name the
sgr keys that are defined to represent the tags. Each module tag
matching a sgr code is then graphically represented over module name and
not reported by its tag name or abbreviated name.
If an abbreviation exists for tag name, sgr key is matched against this
abbreviated string. If no abbreviation exists for a tag, sgr key is
matched against tag full name.
Currently only graphically render single tag.
Raise an error when a reserved tag name is defined with module-tag.
Reserved names are currently: loaded, auto-loaded, forbidden,
nearly-forbidden and hidden.
Add the collected argument to the isModuleTagged procedure to get the
ability to query tag information for designed modulefile from collected
tags data for module rather raw tag definition applying to module
specification.
Enable this query mode to determine if module is nearly-forbidden in
execute-modulefile procedure (as tags for evaluated modules are fetched
right before this test).
Disable 'nearly-forbidden' tag check when performing an unload
evaluation.
Collect all tags applying to the modulefile that need to be evaluated
right before the start of its evaluation. It enables to get the accurate
tag information during modulefile evaluation whatever the kind of
evaluation (load, unload, display, help, ...). Disable mechanism for
source and unsource evaluation contexts.
In case current user environment state is inconsistent, do not break the
whole modulefile evaluation.
Introduce the `module-tag` modulefile command to enable users to
associate their own tag to modulefiles. These tags are reported on
`avail` and `list` sub-command outputs.
This new command is intended to be used in modulerc evaluation context.
It is also recorded for modulefile evaluation context as it corresponds
to the evaluation context of the global and user RCs.
Add the `aftbef` argument to the parseApplicationCriteriaArgs procedure
to optionally support the --after and --before command-line switches. If
support disabled (aftbef set to 0) an argument equal to --after or
--before is treated as regular content.
Introduce the `tags` sub-command to the module-info modulefile command
to return the list of tags applying to currently evaluated module or
tell if tag specified as argument applyes to this module.
Set a `hidden` tag for each module targetted by a hidden definition
coming whether from a module-hide statement or by module name or version
starting with a dot character.
The `hidden` tag is not exported in MODULES_LMTAG for loading module as
the hidden state concerns the `avail` report only.
Output the tags of the modules returned by the list sub-command. Adapt
module list regular and json output styles to include these tags
(enclosed in <> like for avail sub-command).
No output of tags on terse output mode as nothing other than module name
is displayed on this mode currently.
Record in user environment the tags applying to loaded modules. Making
this information persist in environment via MODULES_LMTAG variable helps
to report them on `list` sub-command and to remember these tags when the
module will be unloaded.
Consolidate tags set for the modules returned by getModules procedure
only if called from an avail sub-command, as these informations are
only useful for this context (list sub-command does not rely on
getModules).