From a2657993bad828af6743c68931a0e848bfcdec53 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 21 Nov 2021 23:57:41 -0600 Subject: I DECLARE BANKRUPTCY ... 8 Didn't think to do this till pretty .. written, so here we are. --- eshell.el | 83 --------------------------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 eshell.el (limited to 'eshell.el') diff --git a/eshell.el b/eshell.el deleted file mode 100644 index c6d8e16..0000000 --- a/eshell.el +++ /dev/null @@ -1,83 +0,0 @@ -;;; eshell.el --- eshell-specific configuration -*- lexical-binding: t; -*- - -;; Copyright (C) 2021 Case Duckworth - -;; Author: Case Duckworth <(rot13-string "npqj@npqj.arg")> - -;;; Commentary: - -;; Much like ~/.emacs.d/gnus.el, this is eshell-specific configuration that's -;; loaded whenever `eshell' is loaded. - -;;; Code: - -(require 'setup) -(require 'eshell) -(require 'em-alias) - -;;; 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"))) - (cl-letf (((symbol-function 'eshell-write-aliases-list) #'ignore)) - (eshell/alias (car definition) (cdr definition)))) -(eshell-write-aliases-list) - -;;; Functions - -;; https://karthinks.com/software/jumping-directories-in-eshell/ -(defun eshell/z (&optional regexp) - "Navigate to a previously visited directory in eshell, or to -any directory proferred by `consult-dir'." - (let ((eshell-dirs (delete-dups - (mapcar 'abbreviate-file-name - (ring-elements eshell-last-dir-ring))))) - (cond - ((and (not regexp) (featurep 'consult-dir)) - (let* ((consult-dir--source-eshell `(:name "Eshell" - :narrow ?e - :category file - :face consult-file - :items ,eshell-dirs)) - (consult-dir-sources (cons consult-dir--source-eshell - consult-dir-sources))) - (eshell/cd (substring-no-properties - (consult-dir--pick "Switch directory: "))))) - (t (eshell/cd (if regexp (eshell-find-previous-directory regexp) - (completing-read "cd: " eshell-dirs))))))) - -;;; Extra eshell packages - -(setup (:straight esh-autosuggest) - (:hook-into eshell-mode)) - -(setup (:straight eshell-syntax-highlighting) - (eshell-syntax-highlighting-global-mode +1)) - -(setup (:straight-when fish-completion - (executable-find "fish")) - (:autoload global-fish-completion-mode) - (global-fish-completion-mode +1)) - -(setup (:straight-when eshell-vterm - (require 'vterm nil :noerror)) - (eshell-vterm-mode +1) - (defalias 'eshell/v 'eshell-exec-visual)) - -;;; Miscellaneous - -;; Fix modeline -(when (boundp 'simple-modeline--mode-line) - (setq mode-line-format '(:eval simple-modeline--mode-line))) - -(provide 'eshellrc) -;;; eshell.el ends here - -;; Local Variables: -;; flymake-inhibit: t -;; End: -- cgit 1.4.1-21-gabe81