diff options
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/modules/thanos-shells.el | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/.emacs.d/modules/thanos-shells.el b/.emacs.d/modules/thanos-shells.el index c421f48..2242733 100644 --- a/.emacs.d/modules/thanos-shells.el +++ b/.emacs.d/modules/thanos-shells.el @@ -102,20 +102,25 @@ "Completion rules for `hut' command" (pcomplete-here (append pcomplete-hut-commands))) -(setq thanos/eshell-aliases - '((g . magit) - (gl . magit-log) - (gc . magit-clone) - (d . dired) - (o . find-file) - (oo . find-file-other-window) - (ll . (lambda () (eshell/ls '-lha))) - (eshell/clear . eshell/clear-scrollback))) - -;; Define aliases using `mapc` -(mapc (lambda (alias) - (defalias (car alias) (cdr alias))) - thanos/eshell-aliases) + +;; Setting eshell aliases +(defvar thanos/aliases + '((g . magit) + (gl . magit-log) + (gc . magit-clone) + (d . dired) + (o . find-file) + (oo . find-file-other-window) + (ll . (lambda () (eshell/ls '-lha))) + (eshell/clear . eshell/clear-scrollback))) + +(defun thanos/set-eshell-aliases (aliases) + "Set ALIASES as eshell aliases." + (mapc (lambda (alias) + (defalias (car alias) (cdr alias))) + aliases)) + +(add-hook 'eshell-mode-hook #'(lambda () (thanos/set-eshell-aliases thanos/aliases))) ;; PATH (defvar eshell-path-env (getenv "~/.local/bin")) |