[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. What is Eshell?

Eshell is a command shell written using Emacs Lisp. All of what it does it uses Emacs' facilities to do. This means Eshell is as portable as Emacs itself. It also means that cooperation with other Lisp code is natural and seamless.

So what is a command shell? To properly understand the role of a shell, it's necessary to visualize what a computer does for you. Basically, a computer is a tool; in order to use that tool, you must tell it what to do--or give it "commands". These commands take many forms, such as clicking with a mouse on certain parts of the screen. But that is only one form of command input.

By far the most versatile way to express what you want the computer to do is using an abbreviated language, called script. In script, instead of telling the computer, "list my files, please", we write just "list". In fact, this command is so commonly used that we abbreviate it to "ls". Typing ls in a command shell is a script way of telling the computer to list your files. This is comparable to viewing the contents of a folder using a graphical display.

The real flexibility is apparent only when you realize that there are many, many ways to list your files. Perhaps you want them sorted by name, or sorted by date, or in reverse order, or grouped by type. Most graphical browsers have simple ways to express this. But what about showing only a few files, or only files that meet a certain criteria? In very complex and specific situations, the request becomes too difficult to express with a mouse. It is just these kinds of requests that are solvable using a command shell.

For example, what if you want to list every Word file on your hard drive, larger than 100 kilobytes in size, and which hasn't been looked at in over six months? That is a good candidate list for deletion, when you go to clean up your hard drive. But have you ever tried asking your computer for such a list? There is no way to do it! At least, not without using a command shell.

So the role of a command shell is to give you more control over what your computer does for you. Not everyone needs this amount of control, and it does come at a cost: Learning the necessary script commands to express what you want done. A complicated query, such as the example above, takes time to learn. But if you find yourself using your computer frequently enough, it is more than worthwhile in the long run. Any tool you use often deserves your time in learning to master it. (1)

As of Emacs 21, Eshell is part of the standard Emacs distribution.

1.1 Contributors to Eshell  
1.2 Installation  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 Contributors to Eshell

Contributions to Eshell are welcome. I have limited time to work on this project, but I will gladly add any code you contribute to me to this package.

The following persons have made contributions to Eshell.

Apart from these, a lot of people have sent suggestions, ideas, requests, bug reports and encouragement. Thanks a lot! Without you there would be no new releases of Eshell.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 Installation

As mentioned above, Eshell comes preinstalled since Emacs 21. If you're using Emacs 20.4 or later, or XEmacs 21, you can download the most recent version of Eshell from http://www.gci-net.com/users/j/johnw/Emacs/eshell.tar.gz.

If you are using Emacs 21, please skip this section.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2.1 Short Form

Here's exactly what to do, with no explanation why:

  1. `M-x load-file RET eshell-auto.el RET'
  2. `ESC : (add-to-list 'load-path "<path where Eshell resides>") RET'
  3. `ESC : (add-to-list 'load-path "<path where Pcomplete resides>") RET'
  4. `M-x eshell RET'

    You should see a version banner displayed.

  5. `ls RET'

    Confirm that you see a file listing.

  6. `eshell-test RET'

    Confirm that everything runs correctly. Use `M-x eshell-report-bug' if not.

  7. `cd ${dirname (locate-library "eshell-auto")} RET'
  8. `find-file Makefile RET'
  9. Edit the Makefile to reflect your site.
  10. `M-x eshell RET'
  11. `make install RET'
  12. `find-file $user-init-file RET'
  13. Add the following lines to your `.emacs' file:

     
    (add-to-list 'load-path "<directory where you install Eshell>")
    (load "eshell-auto")
    

  14. `M-x eshell RET'
  15. `customize-option #'eshell-modules-list RET'
  16. Select the extension modules you prefer.
  17. Restart Emacs!
  18. `M-x info RET m Eshell RET'

    Read the manual and enjoy!


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2.2 Long Form

  1. Before building and installing Eshell, it is important to test that it will work properly on your system. To do this, first load `eshell-auto', which will define certain autoloads required to run Eshell. This can be done using the command M-x load-file, and then selecting the file `eshell-auto.el'.

  2. In order for Emacs to find Eshell's files, the Eshell directory must be added to the load-path variable. This can be done within Emacs by typing:

     
    ESC : (add-to-list 'load-path "<path where Eshell resides>") RET
    ESC : (add-to-list 'load-path "<path where Pcomplete resides>") RET
    

  3. Start Eshell from the distributed sources, using default settings, by typing M-x eshell.

  4. Verify that Eshell is functional by typing ls followed by RET. You should have already seen a version banner announcing the version number of this release, followed by a prompt.

  5. Run the test suite by typing eshell-test followed by RET in the Eshell buffer. It is important that Emacs be left alone while the tests are running, since extraneous command input may cause some of the tests to fail (they were never intended to run in the background). If all of the tests pass, Eshell should work just fine on your system. If any of the tests fail, please send e-mail to the Eshell maintainer using the command M-x eshell-report-bug.

  6. Edit the file `Makefile' in the directory containing the Eshell sources to reflect the location of certain Emacs dircetories at your site. The only things you really have to change are the definitions of lispdir and infodir. The elisp files will be copied to lispdir, and the info file to infodir.

  7. Type make install in the directory containing the Eshell sources. This will byte-compile all of the `.el' files and copy both the source and compiled versions to the directories specified in the previous step. It will also copy the info file, and add a corresponding entry to your `dir' file----if `install-info' can be found.

    If you only want to create the compiled elisp files, but don't want to install them, you can type just make instead.

  8. Add the directory into which Eshell was installed to your load-path variable. This can be done by adding the following line to your `.emacs' file:

     
    (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/eshell")
    

    The actual directory on your system may differ.

  9. To install Eshell privately, edit your `.emacs' file; to install Eshell site-wide, edit the file `site-start.el' in your `site-lisp' directory (usually `/usr/local/share/emacs/site-lisp' or something similar). In either case enter the following line into the appropriate file:

     
    (load "eshell-auto")
    

  10. Restart Emacs. After restarting, customize the variable eshell-modules-list. This variable selects which Eshell extension modules you want to use. You will find documentation on each of those modules in the Info manual.

If you have TeX installed at your site, you can make a typeset manual from `eshell.texi'.

  1. Run TeX by typing `texi2dvi eshell.texi'.
  2. Convert the resulting device independent file `eshell.dvi' to a form which your printer can output and print it. If you have a postscript printer there is a program, dvi2ps, which does. There is also a program which comes together with TeX, dvips, which you can use.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs shared group account on December, 19 2009 using texi2html 1.65.