Skip to content

Commit

Permalink
PR #644: Test version colorization with hook and Personal/SitePackage…
Browse files Browse the repository at this point in the history
….lua
  • Loading branch information
Robert McLay committed Jun 12, 2023
1 parent dc9385b commit 6aaba99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.new
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ Lmod 8.7+
* Issue #617: Now print alias and de-refed module in module list and module -t list.
* Issue #651: Allow -f and --force to be the same option for the lmod command (module)
* Issue #654: Do not use install to copy symbolic links
(8.7.27) * PR #644: Created hook colorize_fullName to allow for sites to control how "module list" and "module av"
prints to the terminal.


4 changes: 2 additions & 2 deletions contrib/Personal/SitePackage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ local function l_colorize_fullName(fullName, sn)
local meta_color = getenv("LMOD_DISPLAY_META_COLOR")

---- colorize() will use `plain` if `color` is not found.

local moduleName
if (version) then
moduleName = moduleName .. colorize(version_color, "/"..version)
moduleName = colorize(sn_color, sn) .. colorize(version_color, "/"..version)
else
moduleName = colorize(meta_color, sn)
end
Expand Down
4 changes: 2 additions & 2 deletions contrib/TACC/SitePackage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ local function l_colorize_fullName(fullName, sn)
local meta_color = getenv("LMOD_DISPLAY_META_COLOR")

---- colorize() will use `plain` if `color` is not found.

local moduleName
if (version) then
moduleName = moduleName .. colorize(version_color, "/"..version)
moduleName = colorize(sn_color, sn) .. colorize(version_color, "/"..version)
else
moduleName = colorize(meta_color, sn)
end
Expand Down

0 comments on commit 6aaba99

Please sign in to comment.