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 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 (see Aliases). Example:
~ $ which sudo eshell/sudo is a compiled Lisp function in `em-tramp.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
Some of the built-in commands have different behavior from their
external counterparts, and some have no external counterpart. Most of
these will print a usage message when given the
diff(not to be confused with
ediff). See Comparing Files.
list. Allows you to create a list using Eshell syntax, rather than Elisp syntax. For example, ‘listify foo bar’ and
("foo" "bar")both evaluate to
locatefunction, which simply runs the external locate command and parses the results. See Dired and Find.
compilewhen run asynchronously (e.g., ‘make &’). See Compilation. Otherwise call the external make command.
occur. See Other Repeating Search.
When 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.
Eshell knows a few built-in variables:
See Aliases, for the built-in variables ‘$*’, ‘$1’, ‘$2’, ..., in alias definitions.