Sticky Shell: show previous prompt in header-line
This commit is contained in:
parent
6897c1d590
commit
a09033b925
@ -232,6 +232,30 @@ If the current window occupies the whole frame, split it."
|
||||
(kbd "RET") 'hkey-either))
|
||||
(advice-add 'evil-collection-eshell-setup-keys
|
||||
:after 'mitch/eshell-setup-keys))
|
||||
;; show command that caused last scrollback in eshell etc
|
||||
(elpaca-use-package (sticky-shell
|
||||
:host github
|
||||
:repo "andyjda/sticky-shell")
|
||||
:after eshell
|
||||
:config
|
||||
(defun esh--turn-off-sticky-shell ()
|
||||
"Disable `sticky-shell-mode'."
|
||||
(sticky-shell-mode -1))
|
||||
(defun esh--turn-on-sticky-shell ()
|
||||
"Enable `sticky-shell-mode'."
|
||||
(sticky-shell-mode 1))
|
||||
(defun mitch/sticky-shell-refresh ()
|
||||
"Only turn on sticky-shell if the prompt is at the bottom line of window."
|
||||
(if (>= (line-number-at-pos (point)) (window-height))
|
||||
(esh--turn-on-sticky-shell)
|
||||
(esh--turn-off-sticky-shell)))
|
||||
(add-hook 'eshell-post-command-hook #'mitch/sticky-shell-refresh)
|
||||
;; https://emacs.ch/@bram85/109612654687707030
|
||||
(defun mitch/esh-outline-setup ()
|
||||
(outline-minor-mode)
|
||||
(setq-local outline-regexp eshell-prompt-regexp))
|
||||
(add-hook 'eshell-mode-hook #'mitch/esh-outline-setup))
|
||||
|
||||
|
||||
(elpaca-use-package (eat
|
||||
:repo "https://codeberg.org/akib/emacs-eat"
|
||||
|
Loading…
Reference in New Issue
Block a user