Skip to content

Commit c21c6bb

Browse files
committed
doc: desc. 'Variant shortcuts' in MIGRATING
1 parent f1ac7a1 commit c21c6bb

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

MIGRATING.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,34 @@ builds that are compatible between each other.
208208
Loading :sgrhi:`foo/2.1`:sgrse:`{`:sgrva:`toolchain=a`:sgrse:`}`
209209
:sgrin:`Loading requirement`: bar/1.2\ :sgrse:`{`:sgrva:`-debug`:sgrse:`:`:sgrva:`toolchain=a`:sgrse:`}`
210210
211+
Variant shortcuts
212+
-----------------
213+
214+
The :mconfig:`variant_shortcut` configuration option is added to define
215+
shortcut characters for easily specifying variants. Instead of writing the
216+
variant name to specify it in module designation (e.g., *name=value*), the
217+
shortcut associated to this variant could be used (i.e., *<shortcut>value*):
218+
219+
.. parsed-literal::
220+
221+
:ps:`$` module purge
222+
:ps:`$` module config variant_shortcut toolchain=%
223+
:ps:`$` module load foo/2.1 %a
224+
Loading :sgrhi:`foo/2.1`:sgrse:`{`:sgrva:`%a`:sgrse:`}`
225+
:sgrin:`Loading requirement`: bar/1.2\ :sgrse:`{`:sgrva:`-debug`:sgrse:`:`:sgrva:`%a`:sgrse:`}`
226+
227+
Configured shortcuts are also used to report the loaded variant on
228+
:subcmd:`list` sub-command output (shortcuts are explained in key section):
229+
230+
.. parsed-literal::
231+
232+
:ps:`$` module list
233+
Currently Loaded Modulefiles:
234+
1) :sgral:`bar/1.2`\ :sgrse:`{`:sgrva:`-debug`:sgrse:`:`:sgrva:`%a`:sgrse:`}` 2) foo/2.1\ :sgrse:`{`:sgrva:`%a`:sgrse:`}`
235+
236+
Key:
237+
:sgral:`auto-loaded` :sgrse:`{`:sgrva:`-variant`:sgrse:`}`\=\ :sgrse:`{`:sgrva:`variant=off`:sgrse:`}` :sgrse:`{`:sgrva:`%value`:sgrse:`}`\=\ :sgrse:`{`:sgrva:`toolchain=value`:sgrse:`}` :sgrse:`{`:sgrva:`variant=value`:sgrse:`}`
238+
211239
212240
From v4.6 to v4.7
213241
=================

0 commit comments

Comments
 (0)