Previous: Shell Mode, Up: Interactive Evaluation and Executing Lisp Expressions [Index]
Eshell is a shell-like command interpreter implemented in Emacs Lisp. It invokes no external processes except for those requested by the user. It is intended to be an alternative to the IELM (*note Emacs Lisp Interaction: (emacs)Lisp Interaction.) REPL for Emacs and with an interface similar to command shells such as ‘bash’, ‘zsh’, ‘rc’, or ‘4dos’. It has its own Info manual.
Eshell is a “command shell” written in Emacs Lisp. Everything it does, it uses Emacs’s facilities to do. This means that Eshell is as portable as Emacs itself. It also means that cooperation with Lisp code is natural and seamless.
You can evaluate elisp in Eshell directly from the prompt.
Unlike regular system shells, Eshell never invokes kernel functions directly, such as ‘exec(3)’. Instead, it uses the Lisp functions available in the Emacs Lisp library. It does this by transforming the input line into a callable Lisp form. The command can be either an Elisp function or an external command. To see the Lisp form that will be invoked, type: ‘eshell-parse-command "echo hello"’