Skip to content

Commit

Permalink
doc: desc. in man how to init Modules in Ruby script
Browse files Browse the repository at this point in the history
Fixes #535
  • Loading branch information
xdelaruelle committed Aug 22, 2024
1 parent dd72ccb commit 672e287
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .hunspell.en.dic
Original file line number Diff line number Diff line change
Expand Up @@ -1169,3 +1169,4 @@ codename
EVENTLIST
logfd
OpenSuse
ENVModule
2 changes: 2 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Modules 5.5.0 (not yet released)
* Tag automatically loaded module ``auto-loaded`` prior evaluation to be able
to query this state during modulefile evaluation with :mfcmd:`module-info
tags<module-info>`.
* Doc: describe in :ref:`module(1)` man page how to initialize Modules in a
Ruby script. (fix issue #535)

.. warning:: Variant names are now fully checked instead of just verifying
their first character. Only characters within the ``A-Za-z0-9_-`` range are
Expand Down
7 changes: 7 additions & 0 deletions doc/source/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ Python:
exec(open("\ |initdir|\ /python.py").read(), globals())
module("load", "modulefile", "modulefile", "...")
Ruby:

.. parsed-literal::
require '\ |initdir|\ /ruby.rb'
ENVModule.module('load', 'modulefile', 'modulefile', '...')
Bourne Shell (sh) (and derivatives) with :subcmd:`autoinit` sub-command:

.. parsed-literal::
Expand Down

0 comments on commit 672e287

Please sign in to comment.