mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
Let the possibility to append or prepend path element entry to a variable even if this entry is already registered into the variable which introduces duplicates element within the variable value. Entries are added with eventual duplication by the use of the --duplicate option on append-path and prepend-path commands. These additions increment the reference counter as usual. Removal of duplicated path entry depends on the reference counter value. Entries are not removed unless reference counter value is lesser than the number of duplicated entries.
25 lines
592 B
Plaintext
25 lines
592 B
Plaintext
#%Module1.0
|
|
|
|
##############################################################################
|
|
# Modules Revision 3.0
|
|
# Providing a flexible user environment
|
|
#
|
|
# File: remove/%M%
|
|
# Revision: %I%
|
|
# First Edition: 2017/12/19
|
|
# Last Mod.: %U%, %G%
|
|
#
|
|
# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr
|
|
#
|
|
# Description: Test removing paths added in duplication mode
|
|
# Command:
|
|
# Sub-Command: remove-path
|
|
#
|
|
# Invocation: load @M@/@V@
|
|
# Comment: %C{
|
|
# }C%
|
|
#
|
|
##############################################################################
|
|
|
|
remove-path FOO /path/to/dir1
|