Variable: eshell-interpreter-alist

eshell-interpreter-alist is a customizable variable defined in esh-ext.el.gz.

Value

nil

Documentation

An alist defining interpreter substitutions.

Each member is a cons cell of the form:

  (MATCH . INTERPRETER)

MATCH should be a regexp, which is matched against the command name, or a function of arity 2 receiving the COMMAND and its ARGS (a list). If either returns a non-nil value, then INTERPRETER will be used for that command.

If INTERPRETER is a string, it will be called as the command name, with the original command name passed as the first argument, with all subsequent arguments following. If INTERPRETER is a function, it will be called with all of those arguments. Note that interpreter functions should throw eshell-replace-command with the alternate command form, or they should return a value compatible with the possible return values of eshell-external-command, which see.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-ext.el.gz
(defcustom eshell-interpreter-alist
  (if (eshell-under-windows-p)
      '(("\\.\\(bat\\|cmd\\)\\'" . eshell-invoke-batch-file)))
  "An alist defining interpreter substitutions.
Each member is a cons cell of the form:

  (MATCH . INTERPRETER)

MATCH should be a regexp, which is matched against the command
name, or a function of arity 2 receiving the COMMAND and its
ARGS (a list).  If either returns a non-nil value, then
INTERPRETER will be used for that command.

If INTERPRETER is a string, it will be called as the command name,
with the original command name passed as the first argument, with all
subsequent arguments following.  If INTERPRETER is a function, it will
be called with all of those arguments.  Note that interpreter
functions should throw `eshell-replace-command' with the alternate
command form, or they should return a value compatible with the
possible return values of `eshell-external-command', which see."
  :type '(repeat (cons (choice regexp (function :tag "Predicate"))
		       (choice string (function :tag "Interpreter"))))
  :group 'eshell-ext)