;;; bandali-eshell.el --- bandali's Eshell setup -*- lexical-binding: t; -*-
-;; Copyright (C) 2018-2020 Amin Bandali
+;; Copyright (C) 2018-2022 Amin Bandali
;; Author: Amin Bandali <bandali@gnu.org>
;; Keywords: processes
(with-eval-after-load 'eshell
(make-directory (b/etc "eshell/") t)
- (csetq
+ (setq
eshell-aliases-file (b/etc "eshell/aliases")
eshell-directory-name (b/var "eshell/")
eshell-hist-ignoredups t
(let ((inhibit-read-only t))
(erase-buffer))
(eshell-send-input))
+ (defun b/eshell-history ()
+ (interactive)
+ (completing-read "Eshell history: "
+ (ring-elements eshell-history-ring)))
(defun b/eshell-setup ()
(make-local-variable 'company-idle-delay)
(defvar company-idle-delay)
#'b/eshell-quit-or-delete-char)
(define-key eshell-mode-map (kbd "C-S-l")
#'b/eshell-clear)
- (define-key eshell-mode-map (kbd "M-r")
- #'counsel-esh-history)
- ;; (define-key eshell-mode-map [tab]
- ;; #'company-complete)
(define-key eshell-hist-mode-map (kbd "M-r")
- #'counsel-esh-history)))
+ #'b/eshell-history)))
;; global key bindings
(global-set-key (kbd "C-c a s e") #'eshell)
;; hooks