Skip to content

Commit 0821e6f

Browse files
committed
Update add-property to define tag with "value" arg
Update "add-property" modulefile command to use its *value* argument to define tag on currently loading module. Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 44c42fb commit 0821e6f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

tcl/interp.tcl.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ proc initModfileModeAliases {mode auto aliasesVN aliasesPassArgVN\
102102
scan}
103103
##nagelfar ignore #46 Too long line
104104
array set g_modfilePerModeAliases {
105-
add-property {nop nop nop nop nop nop nop nop }
105+
add-property {add-property nop reportCmd nop nop nop nop nop}
106106
always-load {always-load nop reportCmd nop nop nop nop always-load-sc}
107107
append-path {append-path append-path-un append-path append-path append-path edit-path-wh nop edit-path-sc}
108108
chdir {chdir nop reportCmd nop nop nop nop chdir-sc }

tcl/mfcmd.tcl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,6 +2314,15 @@ proc getModuleHelpLines {} {
23142314
}
23152315
}
23162316
2317+
# convert property value as module tag (property name is ignored)
2318+
proc add-property {name value} {
2319+
set tag_list [split $value :]
2320+
set mod [currentState modulename]
2321+
foreach tag $tag_list {
2322+
module-tag $tag $mod
2323+
}
2324+
}
2325+
23172326
# ;;; Local Variables: ***
23182327
# ;;; mode:tcl ***
23192328
# ;;; End: ***

0 commit comments

Comments
 (0)