mirror of
https://github.com/envmodules/modules.git
synced 2026-06-03 00:33:18 +08:00
Update the *Source script in modulefile* cookbook recipe to add it a *Usage with shell-specific scripts* section that demonstrate how to use modulefiles with `source-sh` commands when software provide a specific initialization script for each shell it supports. Take this opportunity to improve the readability of this recipe by coloring/highlighting shell session examples. Fixes #399.
11 lines
237 B
Groff
11 lines
237 B
Groff
#%Module4.6
|
|
set scriptpath example/source-script-in-modulefile/bar-2.1
|
|
switch -- [module-info shelltype] {
|
|
sh {
|
|
source-sh bash $scriptpath/bar-setup.sh
|
|
}
|
|
csh {
|
|
source-sh tcsh $scriptpath/bar-setup.csh
|
|
}
|
|
}
|