output-configuration.rst (modules-5.1.1.tar.bz2) | : | output-configuration.rst (modules-5.2.0.tar.bz2) | ||
---|---|---|---|---|
.. _output-configuration: | .. _output-configuration: | |||
Output configuration | Output configuration | |||
==================== | ==================== | |||
Configuration | Configuration | |||
------------- | ------------- | |||
- Introduce options to define the content of the output: | - Introduce options to define the content of the output: | |||
- :mconfig:`avail_output`: elements to report on :subcmd:`avail` sub-command | - :mconfig:`avail_output`: elements to report on :subcmd:`avail` sub-command r | |||
regular mode | egular mode | |||
- :mconfig:`avail_terse_output`: elements to report on ``avail`` sub-command | - :mconfig:`avail_terse_output`: elements to report on ``avail`` sub-command t | |||
terse mode | erse mode | |||
- :mconfig:`list_output`: elements to report on :subcmd:`list` sub-command r | - :mconfig:`list_output`: elements to report on :subcmd:`list` sub-command reg | |||
egular mode | ular mode | |||
- :mconfig:`list_terse_output`: elements to report on ``list`` sub-command t | - :mconfig:`list_terse_output`: elements to report on ``list`` sub-command ter | |||
erse mode | se mode | |||
Specification | Specification | |||
------------- | ------------- | |||
- Output configuration is available | - Output configuration is available | |||
- For ``avail`` sub-command, on regular and :option:`--terse` modes | - For ``avail`` sub-command, on regular and :option:`--terse` modes | |||
- For ``list`` sub-command, on regular and :option:`--terse` modes | - For ``list`` sub-command, on regular and :option:`--terse` modes | |||
- Output configuration is not available (but could be added later on) | - Output configuration is not available (but could be added later on) | |||
- For :option:`--long` and :option:`--json` modes | - For :option:`--long` and :option:`--json` modes | |||
- For :subcmd:`aliases`, :subcmd:`savelist`, :subcmd:`whatis`/:subcmd:`searc | - For :subcmd:`aliases`, :subcmd:`savelist`, :subcmd:`whatis`/:subcmd:`search` | |||
h` and :subcmd:`display`/:subcmd:`help` sub-commands | and :subcmd:`display`/:subcmd:`help` sub-commands | |||
- Output configuration defines the content of the output not its format | - Output configuration defines the content of the output not its format | |||
- Options :option:`--terse`, :option:`--long` and :option:`--json` defines o utput format | - Options :option:`--terse`, :option:`--long` and :option:`--json` defines out put format | |||
- These configurations are set by default with the elements reported by default | - These configurations are set by default with the elements reported by default | |||
- ``avail_output``: ``modulepath:alias:dirwsym:sym:tag:key`` | - ``avail_output``: ``modulepath:alias:dirwsym:sym:tag:key`` | |||
- ``avail_terse_output``: ``modulepath:alias:dirwsym:sym:tag`` | - ``avail_terse_output``: ``modulepath:alias:dirwsym:sym:tag`` | |||
- ``list_output``: ``header:idx:variant:sym:tag:key`` | - ``list_output``: ``header:idx:variant:sym:tag:key`` | |||
- ``list_terse_output``: ``header`` | - ``list_terse_output``: ``header`` | |||
- The above default value could be superseded: | - The above default value could be superseded: | |||
- with an environment variable, that can be set through the use of the :subc md:`config` sub-command | - with an environment variable, that can be set through the use of the :subcmd :`config` sub-command | |||
- :envvar:`MODULES_AVAIL_OUTPUT` to supersede ``avail_output`` default v | - :envvar:`MODULES_AVAIL_OUTPUT` to supersede ``avail_output`` default value | |||
alue | - :envvar:`MODULES_AVAIL_TERSE_OUTPUT` to supersede ``avail_terse_output`` d | |||
- :envvar:`MODULES_AVAIL_TERSE_OUTPUT` to supersede ``avail_terse_output | efault value | |||
`` default value | - :envvar:`MODULES_LIST_OUTPUT` to supersede ``list_output`` default value | |||
- :envvar:`MODULES_LIST_OUTPUT` to supersede ``list_output`` default val | - :envvar:`MODULES_LIST_TERSE_OUTPUT` to supersede ``list_terse_output`` def | |||
ue | ault value | |||
- :envvar:`MODULES_LIST_TERSE_OUTPUT` to supersede ``list_terse_output`` | ||||
default value | ||||
- with the :option:`-o`/:option:`--output` command-line option | - with the :option:`-o`/:option:`--output` command-line option | |||
- which applies to the current output mode defined | - which applies to the current output mode defined | |||
- ``-o``/``--output`` also supersedes environment variable definition | - ``-o``/``--output`` also supersedes environment variable definition | |||
- Accepted elements in value lists are: | - Accepted elements in value lists are: | |||
- For ``avail`` options: modulepath, alias, dirwsym, sym, tag, key | - For ``avail`` options: modulepath, alias, dirwsym, sym, tag, key | |||
- For ``list`` options: header, idx, variant, sym, tag, key | - For ``list`` options: header, idx, variant, sym, tag, key | |||
- If the ``-o``/``--output`` options are wrongly specified | - If the ``-o``/``--output`` options are wrongly specified | |||
- An error is raised and evaluation terminates | - An error is raised and evaluation terminates | |||
- It may happen in the following situations | - It may happen in the following situations | |||
- No value set after the option | - No value set after the option | |||
- Option set on unsupported module sub-command | - Option set on unsupported module sub-command | |||
- Element set in option value unsupported by module sub-command | - Element set in option value unsupported by module sub-command | |||
- Elements set in option value not separated by colon character (``:``) | - Elements set in option value not separated by colon character (``:``) | |||
- Option set on unsupported output format (``--long`` or ``--json``) | - Option set on unsupported output format (``--long`` or ``--json``) | |||
- The above situations apply whether command is called from the terminal | - The above situations apply whether command is called from the terminal or | |||
or within a modulefile | within a modulefile | |||
- For all these new configuration options | - For all these new configuration options | |||
- accepted value is a list of strings separated by colon character (``:``) | - accepted value is a list of strings separated by colon character (``:``) | |||
- order of elements in the list does not matter | - order of elements in the list does not matter | |||
- an empty string is a valid value (means only the modulefile name has to be | - an empty string is a valid value (means only the modulefile name has to be r | |||
reported) | eported) | |||
- If the ``MODULES_AVAIL_OUTPUT``/``MODULES_AVAIL_TERSE_OUTPUT``/``MODULES_LIST_ OUTPUT``/``MODULES_LIST_TERSE_OUTPUT`` env vars are wrongly specified | - If the ``MODULES_AVAIL_OUTPUT``/``MODULES_AVAIL_TERSE_OUTPUT``/``MODULES_LIST_ OUTPUT``/``MODULES_LIST_TERSE_OUTPUT`` env vars are wrongly specified | |||
- Their value is ignored | - Their value is ignored | |||
- So the default value takes precedence, unless a ``-o``/``--output`` option | - So the default value takes precedence, unless a ``-o``/``--output`` option i | |||
is specified | s specified | |||
- Value in environment variable is wrongly specified for instance in the fol | - Value in environment variable is wrongly specified for instance in the follo | |||
lowing situations | wing situations | |||
- Element set in option value unsupported by module sub-command | - Element set in option value unsupported by module sub-command | |||
- Elements set in option value not separated by colon character (``:``) | - Elements set in option value not separated by colon character (``:``) | |||
- ``avail_output`` supersedes ``avail_report_dir_sym`` and ``avail_report_mfile_ sym`` configurations | - ``avail_output`` supersedes ``avail_report_dir_sym`` and ``avail_report_mfile_ sym`` configurations | |||
- Enabled ``avail_report_dir_sym`` corresponds to adding ``dirsym`` value to | - Enabled ``avail_report_dir_sym`` corresponds to adding ``dirsym`` value to ` | |||
``avail_output`` | `avail_output`` | |||
- Enabled ``avail_report_mfile_sym`` corresponds to adding ``sym`` value to | - Enabled ``avail_report_mfile_sym`` corresponds to adding ``sym`` value to `` | |||
``avail_output`` | avail_output`` | |||
- Both ``avail_report_dir_sym`` and ``avail_report_mfile_sym`` could be remo | - Both ``avail_report_dir_sym`` and ``avail_report_mfile_sym`` could be remove | |||
ved safely as: | d safely as: | |||
- it was not possible to define them at configure time | - it was not possible to define them at configure time | |||
- or change default value with an environment variable | - or change default value with an environment variable | |||
- Some output content cannot be controlled at the moment with the output options : | - Some output content cannot be controlled at the moment with the output options : | |||
- Hidden modules is exclusively controlled by ``--all`` option to get these | - Hidden modules is exclusively controlled by ``--all`` option to get these mo | |||
modules unveiled | dules unveiled | |||
- Indepth/no-indepth output is exclusively controlled by ``--no-indepth/--in | - Indepth/no-indepth output is exclusively controlled by ``--no-indepth/--inde | |||
depth`` and related configuration option | pth`` and related configuration option | |||
- When *modulepath* element is removed from an ``avail``-related option | - When *modulepath* element is removed from an ``avail``-related option | |||
- all the modulefiles returned from all searched modulepaths are merged and | - all the modulefiles returned from all searched modulepaths are merged and so | |||
sorted as a single set | rted as a single set | |||
- a module appearing in several modulepaths is only reported once | - a module appearing in several modulepaths is only reported once | |||
- tags or symbols applying to a lower priority module with same name are sti | - tags or symbols applying to a lower priority module with same name are still | |||
ll reported | reported | |||
Output key | Output key | |||
^^^^^^^^^^ | ^^^^^^^^^^ | |||
- An output key is added to print a legend explaining the output | - An output key is added to print a legend explaining the output | |||
- Meaning of ``()``, ``{}`` or ``<>`` is explained | - Meaning of ``()``, ``{}`` or ``<>`` is explained | |||
- Default version is colored specifically | - Default version is colored specifically | |||
- Every tag shortened to a defined abbreviation | - Every tag shortened to a defined abbreviation | |||
- Every tag colored specifically | - Every tag colored specifically | |||
- Every variant type set (``variant=value``, ``+boolvariant``, ``-boolvarian | - Every variant type set (``variant=value``, ``+boolvariant``, ``-boolvariant` | |||
t``, ``%shortcutvariantvalue``, etc) | `, ``%shortcutvariantvalue``, etc) | |||
- Legend entries only concern elements that can be found in reported output | - Legend entries only concern elements that can be found in reported output | |||
- Legend entries are not reported on JSON output mode | - Legend entries are not reported on JSON output mode | |||
- Output key is enabled by default on ``avail`` and ``list`` sub-command output | - Output key is enabled by default on ``avail`` and ``list`` sub-command output | |||
- Key is reported at the end of the output | - Key is reported at the end of the output | |||
- No key section is reported if no element need to be described (no color, n | - No key section is reported if no element need to be described (no color, no | |||
o symbol, no tag, etc) | symbol, no tag, etc) | |||
.. vim:set tabstop=2 shiftwidth=2 expandtab autoindent: | ||||
End of changes. 21 change blocks. | ||||
77 lines changed or deleted | 75 lines changed or added |