Skip to content

Commit

Permalink
doc: desc. edit/MODULES_EDITOR in NEWS/MIGRATING
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Apr 25, 2021
1 parent 5d24241 commit 15cdc75
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
48 changes: 48 additions & 0 deletions MIGRATING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,54 @@ Modules. It provides an overview of the new features and changed behaviors
that will be encountered when upgrading.


From v4.7 to v4.8
=================

This new version is backward-compatible with v4.7 and primarily fixes bugs and
adds new features. Version 4.8 introduces new functionalities that are
described in this section. See the :ref:`4.8 release notes<4.8 release notes>`
for a complete list of the changes between Modules v4.7 and v4.8.

Editing modulefiles
-------------------

:subcmd:`edit` sub-command is introduced to give the ability to open
modulefiles in a text editor. Modulefiles can be specified like with any other
sub-command: using regular, symbolic or aliased names or using advanced
version specifiers.

.. parsed-literal::
:ps:`$` ml edit foo
:subcmd:`edit` sub-command resolves the path toward the designated modulefile
then call configured text editor to open this modulefile with it. Below, the
modulefile is opened with the ``vi`` command:

.. parsed-literal::
#%Module
module-whatis [module-info name]
setenv PATH /path/to/foo-1.0/bin
~
~
~
"/path/to/modulefiles/foo/1.0" 3L, 42B 1,1 All
The :mconfig:`editor` configuration option controls the editor command to use.
This option can be configured at installation time with the
:instopt:`--with-editor` installation option. If not set, :mconfig:`editor`
configuration option is set by default to ``vi``.

:mconfig:`editor` configuration option can be changed with the
:subcmd:`config` sub-command. Which sets the :envvar:`MODULES_EDITOR`
environment variable.

The :envvar:`VISUAL` or the :envvar:`EDITOR` environment variables override
the default value of :mconfig:`editor` configuration option but are overridden
by the :envvar:`MODULES_EDITOR` environment variable.


From v4.6 to v4.7
=================

Expand Down
21 changes: 21 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ Release notes
This file describes changes in recent versions of Modules. It primarily
documents those changes that are of interest to users and admins.

.. _4.8 release notes:

Modules 4.8.0 (not yet released)
--------------------------------

* Introduce the :subcmd:`edit` sub-command that opens modulefile passed as
argument in a text editor. Modulefile can be specified like with any other
sub-command, leveraging defined symbolic versions, aliases or using advanced
version specifiers.
* Add the :mconfig:`editor` configuration option to select the text editor to
use with :subcmd:`edit` sub-command. When this option is set through the
:subcmd:`config` sub-command, the :envvar:`MODULES_EDITOR` environment
variable is set. The :instopt:`--with-editor` installation option controls
the default value of :mconfig:`editor` configuration option. If not set at
installation time, ``vi`` is set as default editor.
* Default value of :mconfig:`editor` configuration option is overridden by the
:envvar:`VISUAL` or the :envvar:`EDITOR` environment variables, which are
both in turn overridden by the :envvar:`MODULES_EDITOR` environment
variable.


.. _4.7 release notes:

Modules 4.7.1 (2021-04-06)
Expand Down

0 comments on commit 15cdc75

Please sign in to comment.