eshell: Scripts

 
 2.9 Scripts
 ===========
 
 You can run Eshell scripts much like scripts for other shells; the main
 difference is that since Eshell is not a system command, you have to run
 it from within Emacs.  An Eshell script is simply a file containing a
 sequence of commands, as with almost any other shell script.  Scripts
 are invoked from Eshell with ‘source’, or from anywhere in Emacs with
 ‘eshell-source-file’.
 
    If you wish to load a script into your _current_ environment, rather
 than in a subshell, use the ‘.’ command.