      (with-selected-window (posn-window (event-start event))
        ,@body)))
 
+(def-with-selected-window my-header-line-shell-erase-buffer-and-run-prev-cmd
+  (my-shell-erase-buffer)
+  (comint-previous-input 1)
+  (comint-send-input))
+
+(def-with-selected-window my-header-line-shell-erase-buffer
+  (my-shell-erase-buffer))
+
+
 (def-with-selected-window my-mode-line-kill-file-full-path
   (let ((full (buffer-file-name)))
     (when full

    (add-hook hook 'my-show-trailing-whitespace)))

; (setq-default visual-line-mode t)
(setq-default indent-tabs-mode nil)
(setq make-backup-files nil)
(setq inhibit-splash-screen t)

  'isearch-repeat-forward)
(define-key isearch-mode-map (kbd "<S-return>")
  'isearch-repeat-backward)
;(define-key isearch-mode-map (kbd "<backspace>") 'my-isearch-delete-region)

(defun my-isearch-delete-region ()
  (interactive)
