Function: eshell-read-aliases-list

eshell-read-aliases-list is an interactive and byte-compiled function defined in em-alias.el.gz.

Signature

(eshell-read-aliases-list)

Documentation

Read in an aliases list from eshell-aliases-file.

This is useful after manually editing the contents of the file.

Probably introduced at or before Emacs version 30.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-alias.el.gz
(defun eshell-read-aliases-list ()
  "Read in an aliases list from `eshell-aliases-file'.
This is useful after manually editing the contents of the file."
  (interactive)
  (when (and eshell-aliases-file
             (file-readable-p eshell-aliases-file))
    (setq eshell-command-aliases-list
          (with-temp-buffer
            (let (eshell-command-aliases-list)
              (insert-file-contents eshell-aliases-file)
              (while (not (eobp))
                (if (re-search-forward
                     "^alias\\s-+\\(\\S-+\\)\\s-+\\(.+\\)")
                    (setq eshell-command-aliases-list
                          (cons (list (match-string 1)
                                      (match-string 2))
                                eshell-command-aliases-list)))
                (forward-line 1))
              eshell-command-aliases-list)))))