Previous: for loop, Up: Commands

3.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.