2021-09-06 17:51:48 +00:00
|
|
|
;;; eshell.el --- eshell-specific configuration -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;; Copyright (C) 2021 Case Duckworth
|
|
|
|
|
2021-09-25 17:28:57 +00:00
|
|
|
;; Author: Case Duckworth <(rot13-string "npqj@npqj.arg")>
|
2021-09-06 17:51:48 +00:00
|
|
|
;; Keywords:
|
|
|
|
|
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; Much like ~/.emacs.d/gnus.el, this is eshell-specific configuration that's
|
|
|
|
;; loaded whenever `eshell' is loaded.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'setup)
|
|
|
|
|
|
|
|
;;; Environment
|
|
|
|
(setenv "PAGER" "cat")
|
|
|
|
|
|
|
|
;;; Aliases
|
|
|
|
|
|
|
|
(dolist (definition '(("e" . "find-file $1")
|
|
|
|
("ff" . "find-file $1")
|
|
|
|
("emacs" . "find-file $1")
|
|
|
|
("ee" . "find-file-other-window $1")))
|
|
|
|
(eshell/alias (car definition) (cdr definition)))
|
|
|
|
|
|
|
|
;;; Functions
|
|
|
|
|
|
|
|
;;; Extra eshell packages
|
|
|
|
|
|
|
|
(setup (:straight esh-autosuggest)
|
|
|
|
(:hook-into eshell-mode))
|
|
|
|
|
|
|
|
(setup (:straight esh-help)
|
|
|
|
(require 'esh-help)
|
|
|
|
(setq-local eldoc-documentation-function #'esh-help-eldoc-command))
|
|
|
|
|
|
|
|
(setup (:straight eshell-syntax-highlighting)
|
|
|
|
(eshell-syntax-highlighting-global-mode +1))
|
|
|
|
|
|
|
|
(setup (:straight-if fish-completion
|
|
|
|
(executable-find "fish"))
|
|
|
|
(:autoload global-fish-completion-mode)
|
|
|
|
(global-fish-completion-mode +1))
|
|
|
|
|
|
|
|
;;; Miscellaneous
|
|
|
|
|
|
|
|
;; Fix modeline
|
|
|
|
(when (boundp 'simple-modeline--mode-line)
|
|
|
|
(setq mode-line-format '(:eval simple-modeline--mode-line)))
|
|
|
|
|
|
|
|
;;; Tell Emacs our customizations are loaded.
|
|
|
|
(defvar eshell-customizations-loaded t
|
|
|
|
"Whether eshell's customizations have been loaded yet.")
|
|
|
|
|
|
|
|
;;; eshell.el ends here
|