SAM is a command-line tool (for Slackware Linux) which uses a stack
to provide control of the PATH variable and the currently defined set
of environment variables and functions. To do this it uses a set
of executable scripts, functions and compiled code. The result is
a command-line environment that changes the way you see and thus
changes the way you think. It has helped me to write more and
better shell code; perhaps it will help you also.
Click in the menu at the left to learn more about SAM or to download
the distribution