Several commands are built-in in Eshell. In order to call the
external variant of a built-in command foo, you could call
*foo. Usually, this should not be necessary. You can check
what will be applied by the which command:
~ $ which ls
eshell/ls is a compiled Lisp function in `em-ls.el'
~ $ which *ls
/bin/ls
If you want to discard a given built-in command, you could declare an alias, Aliases. Example:
~ $ which sudo
eshell/sudo is a compiled Lisp function in `em-unix.el'
~ $ alias sudo '*sudo $*'
~ $ which sudo
sudo is an alias, defined as "*sudo $*"
If you would prefer to use the built-in commands instead of the external
commands, set eshell-prefer-lisp-functions to t.
Some of the built-in commands have different behaviour from their
external counterparts, and some have no external counterpart. Most of
these will print a usage message when given the --help option.
addpathaliasdatedefinediffdiff (not to be confused with
ediff). See Comparing Files.
grepagrepegrepfgrepglimpsegrep instead.
infojobslist-processes.
killlistifylist. Allows you to create a list using Eshell
syntax, rather than Elisp syntax. For example, ‘listify foo bar’
and ("foo" "bar") both evaluate to ("foo" "bar").
locatelocate function, which simply runs the external
locate command and parses the results. See Dired and `find'.
makecompile. See Running Compilations under Emacs.
occuroccur. See Other Search-and-Loop Commands.
printnlcdWhen it receives no argument at all, it changes to the home directory.
Giving the command ‘cd -’ changes back to the previous working directory (this is the same as ‘cd $-’).
The command ‘cd =’ shows the directory stack. Each line is numbered.
With ‘cd =foo’, Eshell searches the directory stack for a directory matching the regular expression ‘foo’ and changes to that directory.
With ‘cd -42’, you can access the directory stack by number.
susudoEshell knows a few built-in variables:
$+$-cd command).
$_$$t or nil.
$?