Function: eshell-var-initialize

eshell-var-initialize is a byte-compiled function defined in esh-var.el.gz.

Signature

(eshell-var-initialize)

Documentation

Initialize the variable handle code.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-var.el.gz
(defun eshell-var-initialize ()     ;Called from `eshell-mode' via intern-soft!
  "Initialize the variable handle code."
  ;; Break the association with our parent's environment.  Otherwise,
  ;; changing a variable will affect all of Emacs.
  (unless eshell-modify-global-environment
    (setq-local process-environment (eshell-copy-environment)))
  (make-local-variable 'comint-pager)
  (setq-local eshell-subcommand-bindings
              (append eshell-local-variable-bindings
                      eshell-subcommand-bindings))
  (setq-local eshell-complex-commands
	      (append '("env") eshell-complex-commands))

  (setq-local eshell-special-chars-inside-quoting
       (append eshell-special-chars-inside-quoting '(?$)))
  (setq-local eshell-special-chars-outside-quoting
       (append eshell-special-chars-outside-quoting '(?$)))

  (add-hook 'eshell-parse-argument-hook #'eshell-interpolate-variable t t)

  (add-hook 'eshell-prepare-command-hook
	    #'eshell-handle-local-variables nil t)

  (when (eshell-using-module 'eshell-cmpl)
    (add-hook 'pcomplete-try-first-hook
	      #'eshell-complete-variable-reference nil t)
    (add-hook 'pcomplete-try-first-hook
	      #'eshell-complete-variable-assignment nil t)))