#!/bin/sh

# for scripts, remove all aliases, as some shells set unhelpful defaults.
# on interactive shells, remove certain aliases and functions that would interfere.
case $- in
( *i* )	_Msh_testFn() { \unset -f "$@"; \unalias "$@"; }
	_Msh_testFn \
		alias builtin cd command echo eval exec exit false forever getconf kill let \
		local not printf pwd return set showusage so test true ulimit unalias unset \
		@ROFUNC@	# install.sh will replace this tag
	;;
( * )	\unalias -a
	# we don't want CDPATH affecting 'cd' in scripts. on bash, we don't want GLOBIGNORE affecting pathname expansion.
	\unset -v CDPATH GLOBIGNORE
	;;
esac 2>| /dev/null && :

# modernish does _not_ support -e (-o errexit).
set +e

# save and turn off 'allexport' to avoid exporting internal variables.
case $- in
( *a* )	set +a; _Msh_allexport=y ;;
( * )	unset -v _Msh_allexport ;;
esac
