summary refs log tree commit diff stats
path: root/eshell.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-06 12:51:48 -0500
committerCase Duckworth2021-09-06 12:51:48 -0500
commit3e7bb0cc182b2d062d8234f4845c33372480b3db (patch)
tree694db1eb5052e7d2ae7f270dd9d6a8c7285a44fa /eshell.el
parentReorganize emacs-lisp setup (diff)
downloademacs-3e7bb0cc182b2d062d8234f4845c33372480b3db.tar.gz
emacs-3e7bb0cc182b2d062d8234f4845c33372480b3db.zip
Reorganize eshell config
Diffstat (limited to 'eshell.el')
-rw-r--r--eshell.el70
1 files changed, 70 insertions, 0 deletions
diff --git a/eshell.el b/eshell.el new file mode 100644 index 0000000..dc96b8e --- /dev/null +++ b/eshell.el
@@ -0,0 +1,70 @@
1;;; eshell.el --- eshell-specific configuration -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2021 Case Duckworth
4
5;; Author: Case Duckworth <acdw@acdw.net>
6;; Keywords:
7
8;; This program is free software; you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by
10;; the Free Software Foundation, either version 3 of the License, or
11;; (at your option) any later version.
12
13;; This program is distributed in the hope that it will be useful,
14;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;; GNU General Public License for more details.
17
18;; You should have received a copy of the GNU General Public License
19;; along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21;;; Commentary:
22
23;; Much like ~/.emacs.d/gnus.el, this is eshell-specific configuration that's
24;; loaded whenever `eshell' is loaded.
25
26;;; Code:
27
28(require 'setup)
29
30;;; Environment
31(setenv "PAGER" "cat")
32
33;;; Aliases
34
35(dolist (definition '(("e" . "find-file $1")
36 ("ff" . "find-file $1")
37 ("emacs" . "find-file $1")
38 ("ee" . "find-file-other-window $1")))
39 (eshell/alias (car definition) (cdr definition)))
40
41;;; Functions
42
43;;; Extra eshell packages
44
45(setup (:straight esh-autosuggest)
46 (:hook-into eshell-mode))
47
48(setup (:straight esh-help)
49 (require 'esh-help)
50 (setq-local eldoc-documentation-function #'esh-help-eldoc-command))
51
52(setup (:straight eshell-syntax-highlighting)
53 (eshell-syntax-highlighting-global-mode +1))
54
55(setup (:straight-if fish-completion
56 (executable-find "fish"))
57 (:autoload global-fish-completion-mode)
58 (global-fish-completion-mode +1))
59
60;;; Miscellaneous
61
62;; Fix modeline
63(when (boundp 'simple-modeline--mode-line)
64 (setq mode-line-format '(:eval simple-modeline--mode-line)))
65
66;;; Tell Emacs our customizations are loaded.
67(defvar eshell-customizations-loaded t
68 "Whether eshell's customizations have been loaded yet.")
69
70;;; eshell.el ends here