diff options
author | Thanos Apollo <[email protected]> | 2023-10-04 15:08:46 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-10-04 15:17:19 +0300 |
commit | 072531e96ecbdf418799ce26e093f1278da64416 (patch) | |
tree | b17f5d590d09d477b98276126cf80facf91e8e63 /.emacs.d/modules/thanos-shells.el | |
parent | e547ca03ec172aece7395d60dbf33d6f8284eb3a (diff) |
emacas: (shells) update shell aliases
Diffstat (limited to '.emacs.d/modules/thanos-shells.el')
-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")) |