##############################################################################
#   Modules Revision 3.0
#   Providing a flexible user environment
#
#   File:		modules.00-init/%M%
#   Revision:		%I%
#   First Edition:	1995/12/06
#   Last Mod.:		%U%, %G%
#
#   Authors:		Jens Hamisch, Jens.Hamisch@Strawberry.COM
#
#   Description:	initialization of the shell environment
#   Command:
#   Sub-Command:
#
#   Comment:	%C{
#			First time initialization: Remove everything from
#                       environment, that depends on the module package.
#			Select the 'empty' modulerc file
#		}C%
#
##############################################################################

if { $verbose > 0 } {
    send_user "\tInitializing the modulecmd environment ...\n"
}

catch {unset env(MODULEPATH)}
catch {unset env(LOADEDMODULES)}
catch {unset env(MODULESBEGINENV)}
catch {unset env(_MODULESBEGINENV_)}
catch {unset env(_LMFILES_)}

# clean Cygwin env from variable raising warning message
catch {unset env(!::)}

foreach var [array names env] {
    if {[string match "*_modshare" $var]} {
        catch {unset env($var)}
    }
}

set env(MODULERCFILE) "$env(TESTSUITEDIR)/etc/empty"
