You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some environment variables may start or end with a colon character (path entry delimiter). Such value has a special meaning (like falling back to the default paths for MANPATH).
It is desired to add colon character to such variable whether it is currently unset or already hold some path elements.
Adding delimiter character as path element currently raises an error on append-path and prepend-path. And if variable is unset, adding an empty string will not produce a path variable with a colon character.
At the moment, best solution to add a colon character to a path-like variable is following code:
if {[info exists env(VAR)]} {
append-path VAR :
} else {
setenv VAR :
}
It would be interesting to be able to add colon character with one command whatever the state of the environment variable:
append-path VAR :
Such feature is for instance wanted to generate simpler modulefile code on package manager tool like EasyBuild (easybuilders/easybuild-framework#4442).
The text was updated successfully, but these errors were encountered:
Some environment variables may start or end with a colon character (path entry delimiter). Such value has a special meaning (like falling back to the default paths for
MANPATH
).It is desired to add colon character to such variable whether it is currently unset or already hold some path elements.
Adding delimiter character as path element currently raises an error on
append-path
andprepend-path
. And if variable is unset, adding an empty string will not produce a path variable with a colon character.At the moment, best solution to add a colon character to a path-like variable is following code:
It would be interesting to be able to add colon character with one command whatever the state of the environment variable:
append-path VAR :
Such feature is for instance wanted to generate simpler modulefile code on package manager tool like EasyBuild (easybuilders/easybuild-framework#4442).
The text was updated successfully, but these errors were encountered: