From cb41fe9e6de529352523e8cecb1614f7b9e38c74 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Mon, 3 Aug 2026 09:50:56 +0000 Subject: [PATCH] doc: add Windows Terminal profile setup to INSTALL-win Fixes #634 Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Xavier Delaruelle --- .hunspell.en.dic | 1 + INSTALL-win.rst | 18 ++++++++++++++++++ NEWS.rst | 2 ++ 3 files changed, 21 insertions(+) diff --git a/.hunspell.en.dic b/.hunspell.en.dic index 1b82d732d..8d8de51a5 100644 --- a/.hunspell.en.dic +++ b/.hunspell.en.dic @@ -148,6 +148,7 @@ MySoftware Nagelfar NetCDF Neumärker +NoExit OPTLIST OSPS OpenMPI diff --git a/INSTALL-win.rst b/INSTALL-win.rst index 1133cfcdf..9d5ddc7fb 100644 --- a/INSTALL-win.rst +++ b/INSTALL-win.rst @@ -96,6 +96,24 @@ For PowerShell, you may adapt profile script to make ``envmodule`` command initialized when ``pwsh`` shell starts. See the PowerShell documentation on how to `customize your shell environment `_. +Alternatively, if you use `Windows Terminal`_, a PowerShell or ``pwsh`` +profile can be set to initialize Modules on startup without altering the +system-wide ``PATH`` environment variable and without running an install +script. Once the Windows-specific distribution zipball has been unpacked to +a directory of your choice (for instance ``C:\Program Files\Environment +Modules``), open the Windows Terminal settings, select the profile to +adapt and set its *Command line* to:: + + pwsh.exe -NoExit -Command "& Import-Module 'C:\Program Files\Environment Modules\init\pwsh.ps1'" + +Use ``powershell.exe`` instead of ``pwsh.exe`` to rely on the Windows +built-in PowerShell rather than PowerShell Core, and adapt the path passed +to ``Import-Module`` to match where the distribution zipball was unpacked. +The ``envmodule`` command then gets initialized every time this profile +starts. + +.. _Windows Terminal: https://learn.microsoft.com/en-us/windows/terminal/ + Modules installation is now operational and you can setup your modulefiles. By default, the ``modulefiles`` directory in installation directory is defined as a modulepath and contains few modulefile examples:: diff --git a/NEWS.rst b/NEWS.rst index d5e569df2..8e97a6a68 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -171,6 +171,8 @@ Modules 5.7.0 (not yet released) * Doc: fix favicon rendering with a black background instead of white on viewers that ignore transparency, by setting its transparent pixels to a white matte color instead of black. +* Doc: document Windows Terminal profile setup as an alternative way to + initialize Modules on Windows without an install script. (fix issue #634) .. _5.6 release notes: