34 lines
1.1 KiB
EmacsLisp
34 lines
1.1 KiB
EmacsLisp
;; -*- lexical-binding: t; -*-
|
|
|
|
(defun sk/configure-eshell ()
|
|
;; Save command history when commands are entered
|
|
(add-hook 'eshell-pre-command-hook 'eshell-save-some-history)
|
|
|
|
;; Truncate buffer for performance
|
|
(add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer)
|
|
|
|
;; Bind some useful keys for evil-mode
|
|
(evil-define-key '(normal insert visual) eshell-mode-map (kbd "C-r") 'counsel-esh-history)
|
|
(evil-define-key '(normal insert visual) eshell-mode-map (kbd "<home>") 'eshell-bol)
|
|
(evil-normalize-keymaps)
|
|
|
|
(setq eshell-history-size 10000
|
|
eshell-buffer-maximum-lines 10000
|
|
eshell-hist-ignoredups t
|
|
eshell-scroll-to-bottom-on-input t))
|
|
|
|
(use-package eshell-git-prompt)
|
|
|
|
|
|
(add-hook 'eshell-first-time-mode 'sakomacs/configure-eshell)
|
|
|
|
(with-eval-after-load 'esh-opt
|
|
(setq eshell-destroy-buffer-when-process-dies t)
|
|
(setq eshell-visual-commands '("htop" "zsh" "vim"))
|
|
|
|
(eshell-git-prompt-use-theme 'powerline))
|
|
|
|
;; TODO do more stuff with this ig
|
|
|
|
(provide 'sk-shell)
|