Function: eshell-cmpl-initialize

eshell-cmpl-initialize is a byte-compiled function defined in em-cmpl.el.gz.

Signature

(eshell-cmpl-initialize)

Documentation

Initialize the completions module.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-cmpl.el.gz
(defun eshell-cmpl-initialize ()    ;Called from `eshell-mode' via intern-soft!
  "Initialize the completions module."
  (setq-local pcomplete-command-completion-function
              eshell-command-completion-function)
  (setq-local pcomplete-command-name-function
              eshell-cmpl-command-name-function)
  (setq-local pcomplete-default-completion-function
              eshell-default-completion-function)
  (setq-local pcomplete-parse-arguments-function
              #'eshell-complete-parse-arguments)
  (setq-local pcomplete-file-ignore
              eshell-cmpl-file-ignore)
  (setq-local pcomplete-dir-ignore
              eshell-cmpl-dir-ignore)
  (setq-local pcomplete-remote-file-ignore
              eshell-cmpl-remote-file-ignore)
  (setq-local completion-ignore-case
              eshell-cmpl-ignore-case)
  (setq-local pcomplete-autolist
              eshell-cmpl-autolist)
  (setq-local pcomplete-recexact
              eshell-cmpl-recexact)
  (setq-local pcomplete-man-function
              eshell-cmpl-man-function)
  (setq-local pcomplete-compare-entry-function
              eshell-cmpl-compare-entry-function)
  (setq-local pcomplete-expand-before-complete
              eshell-cmpl-expand-before-complete)
  (setq-local pcomplete-cycle-completions
              eshell-cmpl-cycle-completions)
  (setq-local pcomplete-cycle-cutoff-length
              eshell-cmpl-cycle-cutoff-length)
  (setq-local pcomplete-restore-window-delay
              eshell-cmpl-restore-window-delay)
  (setq-local pcomplete-use-paring
              eshell-cmpl-use-paring)
  ;; `comint-file-name-quote-list' should only be set after all the
  ;; load-hooks for any other extension modules have been run, which
  ;; is true at the time `eshell-mode-hook' is run
  (add-hook 'eshell-mode-hook
            (lambda ()
              (setq-local comint-file-name-quote-list
                          eshell-special-chars-outside-quoting))
            nil t)
  (add-hook 'pcomplete-quote-arg-hook #'eshell-quote-backslash nil t)
  (add-hook 'completion-at-point-functions
            #'pcomplete-completions-at-point nil t)
  (eshell-cmpl-mode))