3 :bind
("C-c a s e" . eshell
)
5 (eval-when-compile (defvar eshell-prompt-regexp
))
6 (defun b/eshell-quit-or-delete-char
(arg)
8 (if (and (eolp) (looking-back eshell-prompt-regexp nil
))
9 (eshell-life-is-too-much)
12 (defun b/eshell-clear
()
14 (let ((inhibit-read-only t
))
18 (defun b/eshell-setup
()
19 (make-local-variable 'company-idle-delay
)
20 (defvar company-idle-delay
)
21 (setq company-idle-delay nil
)
22 (bind-keys :map eshell-mode-map
23 ("C-d" . b
/eshell-quit-or-delete-char
)
24 ("C-S-l" . b
/eshell-clear
)
25 ("M-r" . counsel-esh-history
)
26 ;; ([tab] . company-complete)
27 :map eshell-hist-mode-map
28 ("M-r" . counsel-esh-history
)))
31 eshell-prompt-regexp
"\\(.*\n\\)*[$#] "
32 eshell-prompt-function
35 (propertize (format "%s@%s:" (user-login-name) (system-name))
37 (propertize (abbreviate-file-name default-directory
)
38 'face
'font-lock-comment-face
)
39 (propertize "\n" 'face
'default
)
41 (propertize "#" 'face
'red
)
42 (propertize "$" 'face
'default
))
43 (propertize " " 'face
'default
))))
45 :hook
(eshell-mode . b
/eshell-setup
)
47 (eshell-hist-ignoredups t
)
48 (eshell-input-filter 'eshell-input-filter-initial-space
))
50 (provide 'bandali-eshell
)