diff options
author | bd <bdunahu@operationnull.com> | 2024-09-02 10:38:47 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-09-02 10:38:47 -0400 |
commit | d70bb23120549dd48f0bf7c8522c2c96173f38c5 (patch) | |
tree | 44b5365850b2948003a829a76c6a09679648c3bc /.config | |
parent | b2c4335206a4c046a25ce417e4de1d45e4113f59 (diff) |
Override eshell/clear to display banner at every call
Diffstat (limited to '.config')
-rw-r--r-- | .config/emacs/modules/bd--shells.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/emacs/modules/bd--shells.el b/.config/emacs/modules/bd--shells.el index 932943d..309d7ec 100644 --- a/.config/emacs/modules/bd--shells.el +++ b/.config/emacs/modules/bd--shells.el @@ -33,6 +33,19 @@ (propertize (format-time-string " %a, %R") 'face `(:foreground ,(ef-themes-get-color-value 'blue-faint))) (propertize "\n> " 'face `(:foreground ,(ef-themes-get-color-value 'red))))) +(defun eshell/clear (&optional scrollback) + "Override of default function. Scroll contents of eshell window +out of sight, leaving a blank window. If SCROLLBACK is non-nil, +clear the scrollback contents. Outputs banner message." + (interactive) + (if scrollback + (eshell/clear-scrollback) + (let ((eshell-input-filter-functions nil)) + (insert (make-string (window-size) ?\n)) + (eshell-send-input) + (unless eshell-non-interactive-p + (eval eshell-banner-message))))) + ;;;; shell (require 'shell) |