diff options
Diffstat (limited to '.config/emacs/modules/bd--shells.el')
-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) |