Function: eshell-as-subcommand

eshell-as-subcommand is a macro defined in esh-cmd.el.gz.

Signature

(eshell-as-subcommand COMMAND)

Documentation

Execute COMMAND as a subcommand.

A subcommand creates a local environment so that any changes to the environment don't propagate outside of the subcommand's scope. This lets you use commands like cd within a subcommand without changing the current directory of the main Eshell buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-cmd.el.gz
(defmacro eshell-as-subcommand (command)
  "Execute COMMAND as a subcommand.
A subcommand creates a local environment so that any changes to
the environment don't propagate outside of the subcommand's
scope.  This lets you use commands like `cd' within a subcommand
without changing the current directory of the main Eshell
buffer."
  `(let ,eshell-subcommand-bindings
     ,command))