Currently when using puts command to the stdout channel in a modulefile, the passed string is added at the end of the command list to apply to the current shell session.
It seems interesting to be able to put commands also at the start of the command list to apply, for instance to deactivate a setup prior unsetting the PATH to reach the tool that has enabled this setup.
Using a channel named for instance prestdout may help to know the content should be prepended instead of appended:
Currently when using
puts
command to the stdout channel in a modulefile, the passed string is added at the end of the command list to apply to the current shell session.It seems interesting to be able to put commands also at the start of the command list to apply, for instance to deactivate a setup prior unsetting the PATH to reach the tool that has enabled this setup.
Using a channel named for instance
prestdout
may help to know the content should be prepended instead of appended:puts prestdout {mytool deactivate}