insensitive-case.rst (modules-5.1.1.tar.bz2) | : | insensitive-case.rst (modules-5.2.0.tar.bz2) | ||
---|---|---|---|---|
.. _insensitive-case: | .. _insensitive-case: | |||
Insensitive case | Insensitive case | |||
================ | ================ | |||
Configuration | Configuration | |||
------------- | ------------- | |||
- Introduce the :mconfig:`icase` option name | - Introduce the :mconfig:`icase` option name | |||
- Which is made persistent through the :envvar:`MODULES_ICASE` environment v | - Which is made persistent through the :envvar:`MODULES_ICASE` environment var | |||
ariable | iable | |||
- Many people asked for separate options as applying an icase approach to a | - Many people asked for separate options as applying an icase approach to a mo | |||
module loading context is not seen desired by everybody whereas it is in an modu | dule loading context is not seen desired by everybody whereas it is in an module | |||
le search context | search context | |||
- Defined levels of enablement are: | - Defined levels of enablement are: | |||
- ``never`` | - ``never`` | |||
- ``search`` | - ``search`` | |||
- ``always`` | - ``always`` | |||
- icase option will be set by default to | - icase option will be set by default to | |||
- ``never`` in v4 not to change existing behaviors | - ``never`` in v4 not to change existing behaviors | |||
- ``search`` in v5 as it seems to be a general improvement for everybody | - ``search`` in v5 as it seems to be a general improvement for everybody | |||
- A command-line switch :option:`--icase` (short form :option:`-i`) is added | - A command-line switch :option:`--icase` (short form :option:`-i`) is added | |||
- Was there in Modules 3 (for search sub-command only) | - Was there in Modules 3 (for search sub-command only) | |||
- When set, equals to an ``always`` icase mode | - When set, equals to an ``always`` icase mode | |||
- No immediate need for a ``--no-icase`` command-line switch | - No immediate need for a ``--no-icase`` command-line switch | |||
- Combining configuration option and ``--icase`` command-line switch seems s ufficient | - Combining configuration option and ``--icase`` command-line switch seems suf ficient | |||
Specification | Specification | |||
------------- | ------------- | |||
- When enabled, match query string in a case insensitive manner | - When enabled, match query string in a case insensitive manner | |||
- query *soFT* returns soft, SOFT, soFT, SOft, sOft and so on | - query *soFT* returns soft, SOFT, soFT, SOft, sOft and so on | |||
- In case multiple files correspond to the same icase word | - In case multiple files correspond to the same icase word | |||
- like *soft*, *soFT*, *SoFt*, *SOFT* filenames | - like *soft*, *soFT*, *SoFt*, *SOFT* filenames | |||
- query *SOFT* returns *SOFT* (exact match is returned among possibilities) | - query *SOFT* returns *SOFT* (exact match is returned among possibilities) | |||
- query *SoFt* returns *SoFt* (exact match is returned among possibilities) | - query *SoFt* returns *SoFt* (exact match is returned among possibilities) | |||
- query *SOft* returns *soft* (highest lexicographically sorted match is ret | - query *SOft* returns *soft* (highest lexicographically sorted match is retur | |||
urned among possibilities) | ned among possibilities) | |||
- query *soFt* returns *soft* (highest lexicographically sorted match is ret | - query *soFt* returns *soft* (highest lexicographically sorted match is retur | |||
urned among possibilities) | ned among possibilities) | |||
- When icase is enabled for search context it applies to | - When icase is enabled for search context it applies to | |||
- module specification passed as argument in following context: | - module specification passed as argument in following context: | |||
- :ref:`module_version_specification_to_return_all_matching_modules` | - :ref:`module_version_specification_to_return_all_matching_modules` | |||
- When icase is enabled for all context it applies to | - When icase is enabled for all context it applies to | |||
- search context like described above | - search context like described above | |||
- module specification passed as argument in following contexts: | - module specification passed as argument in following contexts: | |||
- :ref:`module_version_specification_to_select_one_module` | - :ref:`module_version_specification_to_select_one_module` | |||
- :ref:`module_version_specification_to_check_compatibility` | - :ref:`module_version_specification_to_check_compatibility` | |||
- module alias and symbolic version resolution triggered by | - module alias and symbolic version resolution triggered by | |||
- ``module-info alias`` | - ``module-info alias`` | |||
- ``module-info version`` | - ``module-info version`` | |||
- ``getPathToModule`` | - ``getPathToModule`` | |||
- ``isModuleEvaluated`` | - ``isModuleEvaluated`` | |||
- the gathering of all module alias and symbolic version targeting a given m | ||||
odule | ||||
- this is processed by ``getAllModuleResolvedName`` procedure | - the gathering of all module alias and symbolic version targeting a given mod | |||
- which is called by | ule | |||
- ``doesLoadingModuleMatchesName`` | - this is processed by ``getAllModuleResolvedName`` procedure | |||
- ``cmdModuleLoad`` | - which is called by | |||
- ``doesLoadingModuleMatchesName`` | ||||
- ``cmdModuleLoad`` | ||||
- Note that whatis specification passed as argument to the ``search`` sub-comman d is always matched in a case insensitive manner | - Note that whatis specification passed as argument to the ``search`` sub-comman d is always matched in a case insensitive manner | |||
Corner cases | Corner cases | |||
------------ | ------------ | |||
- When looking for the best match among loaded modules to select one module to u nload, lastly loaded module, or firstly loaded module depending on :mconfig:`unl oad_match_order` configuration, will be returned | - When looking for the best match among loaded modules to select one module to u nload, lastly loaded module, or firstly loaded module depending on :mconfig:`unl oad_match_order` configuration, will be returned | |||
- When insensitive case is enabled, last or first icase match will be return | - When insensitive case is enabled, last or first icase match will be returned | |||
ed even if an exact match is present among the loaded module list | even if an exact match is present among the loaded module list | |||
- This behavior has an impact in case multiple available modules correspond | - This behavior has an impact in case multiple available modules correspond to | |||
to the same insensitive case string | the same insensitive case string | |||
- For instance *iCaSe* and *IcAsE* modules | - For instance *iCaSe* and *IcAsE* modules | |||
- When ``icase`` is enabled on all contexts and multiple directories match same icase module name | - When ``icase`` is enabled on all contexts and multiple directories match same icase module name | |||
- for instance following modules exist: *ICASE/1.1*, *icase/1.2*, *iCaSe/1.3 | - for instance following modules exist: *ICASE/1.1*, *icase/1.2*, *iCaSe/1.3* | |||
* and *iCaSe/1.4* | and *iCaSe/1.4* | |||
- a ``module avail -i icase`` will sort *iCaSe/1.4* as the highest entry | - a ``module avail -i icase`` will sort *iCaSe/1.4* as the highest entry | |||
- however a ``module load -i icase`` command will load *icase/1.2* | - however a ``module load -i icase`` command will load *icase/1.2* | |||
- as *icase* directory matches query | ||||
- as *icase* directory matches query | - and also ``module load -i ICase`` command will load *icase/1.2* | |||
- and also ``module load -i ICase`` command will load *icase/1.2* | - as no directory *ICase* exists, result is returned from highest directory: *icase* | |||
- as no directory *ICase* exists, result is returned from highest direct ory: *icase* | .. vim:set tabstop=2 shiftwidth=2 expandtab autoindent: | |||
End of changes. 23 change blocks. | ||||
52 lines changed or deleted | 55 lines changed or added |