Move eshell, term & vterm modules to :term

This commit is contained in:
Henrik Lissner 2019-05-18 23:41:18 -04:00
parent 42ba2a22b8
commit 8c65a63b1c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
18 changed files with 41 additions and 30 deletions

View file

@ -0,0 +1,26 @@
;;; term/eshell/autoload/settings.el -*- lexical-binding: t; -*-
;;;###autodef
(defun set-eshell-alias! (&rest aliases)
"Define aliases for eshell.
ALIASES is a flat list of alias -> command pairs. e.g.
(set-eshell-alias!
\"hi\" \"echo hello world\"
\"bye\" \"echo goodbye world\")"
(or (cl-evenp (length aliases))
(signal 'wrong-number-of-arguments (list 'even (length aliases))))
(after! eshell
(while aliases
(let ((alias (pop aliases))
(command (pop aliases)))
(if-let* ((oldval (assoc alias +eshell-aliases)))
(setcdr oldval (list command))
(push (list alias command) +eshell-aliases))))
(when (boundp 'eshell-command-aliases-list)
(if +eshell--default-aliases
(setq eshell-command-aliases-list
(append +eshell--default-aliases
+eshell-aliases))
(setq eshell-command-aliases-list +eshell-aliases)))))