mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
fly, as it were. It's a powerful mechanism for dynamically changing environment variables, aliases, X11 resources, etc. It uses an embedded Tcl intrepretor, with a few extensions. Therefore, it has a well defined language syntax. Version 3.1 is GPL, and includes many improvements over the 3.0beta.
45 lines
1.9 KiB
Plaintext
45 lines
1.9 KiB
Plaintext
#%Module1.0#####################################################################
|
|
##
|
|
## module-info modulefile
|
|
##
|
|
proc ModulesHelp { } {
|
|
global version
|
|
|
|
puts stderr "\tThis module returns all the various module-info values"
|
|
puts stderr "\tin whatever mode you use (except in `whatis' mode)"
|
|
puts stderr "\n\tVersion $version\n"
|
|
InfoOut
|
|
}
|
|
|
|
# for Tcl script use only
|
|
set version @VERSION@
|
|
|
|
module-whatis "returns all various module-info values"
|
|
|
|
proc InfoOut { } {
|
|
puts stderr "+++ module-info +++++++++++++++++++++++++++++++"
|
|
puts stderr [ concat "flags = " [module-info flags]]
|
|
puts stderr [ concat "mode = " [module-info mode]]
|
|
puts stderr [ concat "name = " [module-info name]]
|
|
puts stderr [ concat "specified = " [module-info specified]]
|
|
puts stderr [ concat "shell = " [module-info shell]]
|
|
puts stderr [ concat "shelltype = " [module-info shelltype]]
|
|
#puts stderr [ concat "alias = " [module-info alias]]
|
|
puts stderr [ concat "version = " [module-info version [module-info name]]]
|
|
puts stderr [ concat "user = " [module-info user]]
|
|
puts stderr [ concat "trace = " [module-info trace load]]
|
|
puts stderr [ concat "tracepat = " [module-info tracepat]]
|
|
puts stderr [ concat "symbols = " [module-info symbols]]
|
|
puts stderr "+++ info ++++++++++++++++++++++++++++++++++++++"
|
|
puts stderr [ concat "hostname = " [info hostname ]]
|
|
puts stderr [ concat "level = " [info level ]]
|
|
puts stderr [ concat "loaded null = " [is-loaded null ]]
|
|
puts stderr [ concat "library = " [info library ]]
|
|
puts stderr [ concat "nameofexecutable = " [info nameofexecutable ]]
|
|
puts stderr [ concat "sharedlibextension = " [info sharedlibextension ]]
|
|
puts stderr [ concat "tclversion = " [info tclversion ]]
|
|
puts stderr [ concat "patchlevel = " [info patchlevel ]]
|
|
puts stderr "+++++++++++++++++++++++++++++++++++++++++++++++"
|
|
}
|
|
if {! [ module-info mode whatis ] } {InfoOut}
|