Files
modules/doc/example/source-script-in-modulefile/modulefiles/bar/2.1
Xavier Delaruelle 919662c3c2 doc: desc setup with shell-specific scripts in cookbook
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.
2021-05-30 15:16:33 +02:00

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
}
}