Using eshell - ECB - the Emacs Code Browser
Description: ECB - the Emacs Code Browser

Next: Grepping directories, Previous: Version-control support, Up: Common use-cases

### 10.9 Optimal using of eshell in ECB

ECB offers a very smart integration of the “eshell” if you are using a compile window (see Temp- and compile-buffers)1

Here is a short summary of provided features:

- Ability to jump to the eshell buffer within the compilation window by simply call `eshell` (bound to `C-c . e`). If the eshell isn't running it will be started.
- Expands the compilation window when you run commands. So for example it allows you to view the eshell in minimized mode and then when you run “ls” the window automatically expands (but always depending on the output of the command you run).
- Synchronizes the current directory of the eshell with the current buffer in the current active edit-window of ECB.
- Provides smart window layout of the eshell buffer. This makes sure that the eshell is taking up the exact amount of space and that nothing is hidden.

Here comes a detailed explanation of these features and how to use it (all these features are only available if you use a persistent compile-window, i.e. if `ecb-compile-window-height` is not nil):

You do not have to learn a new command for the eshell-start - just call `eshell` (for convenience also bound to `C-c . e`) and the eshell will displayed in the compile-window of ECB (if eshell is not already alive then it will be started automatically).

ECB tries to display the contents of the eshell-buffer as best as possible, means ECB can autom. enlarge and shrink the compile-window so the contents of the eshell are fitting the window. See option `ecb-eshell-enlarge-when-eshell` and `ecb-eshell-fit-window-to-command-output`. Normally this is done autom. but you can also you the standard compile-window enlarging-command of ECB: `ecb-toggle-compile-window-height`.

ECB tries also to recenter the eshell-buffer as best as possible. Normally this is done autom. but you can do it on demand with the command `ecb-eshell-recenter`.

If option `ecb-eshell-buffer-sync` is true then ECB always synchronizes the command prompt of eshell with the directory of current source-buffer of the current active edit-window.

With the option `ecb-eshell-auto-activate` you can start eshell autom. in the compile-window when ECB is started but of course if a compile-window exists.

#### Footnotes

[1] Of course you can use eshell also if there is no compile-window. Then it is just displayed in the edit-area and there is no special integration.