mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
Add 'stashclear' sub-command
Introduce stashclear sub-command to delete all stash collection file. This sub-command cannot be called from a modulefile evaluation context. Add sub-command empty skeleton: cmdModuleStashclear. Sub-command accepts no argument nor option.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
personal_ws-1.1 en 849
|
||||
personal_ws-1.1 en 850
|
||||
ABBRVLIST
|
||||
ActiveTcl
|
||||
Adrien
|
||||
@@ -288,6 +288,7 @@ cmdModuleReset
|
||||
cmdModuleRestore
|
||||
cmdModuleSearch
|
||||
cmdModuleStash
|
||||
cmdModuleStashclear
|
||||
cmdModuleStashpop
|
||||
cmdModuleStashrm
|
||||
cmdModuleStashshow
|
||||
|
||||
@@ -108,7 +108,7 @@ proc parseModuleCommandName {command defaultcmd} {
|
||||
initlist initclear autoinit clear config help test prepend-path\
|
||||
append-path remove-path is-loaded is-saved is-used is-avail info-loaded\
|
||||
sh-to-mod edit try-load refresh state load-any lint mod-to-sh reset\
|
||||
stash stashpop stashrm stashshow]}]
|
||||
stash stashpop stashrm stashshow stashclear]}]
|
||||
|
||||
reportDebug "(command=$command, cmdvalid=$cmdvalid, cmdempty=$cmdempty)"
|
||||
return [list $command $cmdvalid $cmdempty]
|
||||
@@ -373,7 +373,8 @@ proc module {command args} {
|
||||
path - paths - autoinit - help - prepend-path - append-path -\
|
||||
remove-path - is-loaded - is-saved - is-used - is-avail -\
|
||||
info-loaded - clear - sh-to-mod - edit - refresh - source - state -\
|
||||
lint - mod-to-sh - reset - stash - stashpop - stashrm - stashshow {
|
||||
lint - mod-to-sh - reset - stash - stashpop - stashrm - stashshow -\
|
||||
stashclear {
|
||||
knerror "${msgprefix}Command '$command' not supported$tryhelpmsg"
|
||||
}
|
||||
}
|
||||
@@ -398,7 +399,7 @@ proc module {command args} {
|
||||
}
|
||||
}
|
||||
refresh - reload - aliases - purge - initlist - initclear - autoinit -\
|
||||
reset - stash {
|
||||
reset - stash - stashclear {
|
||||
if {[llength $args] != 0} {
|
||||
set argnberr 1
|
||||
}
|
||||
@@ -732,6 +733,9 @@ proc module {command args} {
|
||||
stashshow {
|
||||
cmdModuleStashshow {*}$args
|
||||
}
|
||||
stashclear {
|
||||
cmdModuleStashclear
|
||||
}
|
||||
help {
|
||||
cmdModuleHelp {*}$args
|
||||
}
|
||||
|
||||
@@ -1778,7 +1778,7 @@ See 'module --help' to get available commands and options.}
|
||||
|
||||
proc reportUsage {} {
|
||||
reportVersion
|
||||
##nagelfar ignore #104 Too long line
|
||||
##nagelfar ignore #105 Too long line
|
||||
report {Usage: module [options] [command] [args ...]
|
||||
|
||||
Loading / Unloading commands:
|
||||
@@ -1817,6 +1817,7 @@ Collection of modules handling commands:
|
||||
stashpop [stash] Restore then remove stash collection
|
||||
stashrm [stash] Remove stash collection
|
||||
stashshow [stash] Display information about stash collection
|
||||
stashclear Remove all stash collections
|
||||
|
||||
Environment direct handling commands:
|
||||
prepend-path [-d c] var val [...] Prepend value to environment variable
|
||||
|
||||
@@ -2819,6 +2819,9 @@ proc cmdModuleStashshow {{stash 0}} {
|
||||
cmdModuleSaveshow $coll
|
||||
}
|
||||
|
||||
proc cmdModuleStashclear {} {
|
||||
}
|
||||
|
||||
# ;;; Local Variables: ***
|
||||
# ;;; mode:tcl ***
|
||||
# ;;; End: ***
|
||||
|
||||
Reference in New Issue
Block a user