;;; -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (with-eval-after-load "term" (defalias 'term 'ansi-term)) (add-to-list 'exec-path "/home/bdunahu/.local/bin") (use-package esh-mode :custom (eshell-scroll-to-bottom-on-input 'this)) (use-package em-banner :custom (eshell-banner-message (concat "\n" (propertize " " 'display (create-image (expand-file-name "images/raven.png" user-emacs-directory) 'png nil :scale 0.8 :align-to "center")) "\n"))) (use-package em-prompt :hook ((modus-themes-post-load . (lambda () (modus-themes-with-colors (set-face-attribute 'eshell-prompt nil :foreground fg-main :background bg-alt :height 1.1 :extend t))))) :config (defun bd/get-prompt-path () (abbreviate-file-name (eshell/pwd))) (defun bd/eshell-prompt () "Return a prettified shell prompt." (concat (system-name) (format " %s" (bd/get-prompt-path)) " >\n")) :custom (eshell-prompt-function 'bd/eshell-prompt) (eshell-prompt-regexp (rx bol (eval (system-name)) (one-or-more anything) " >\n"))) (use-package eshell :bind (:map eshell-mode-map ("" . #'completion-at-point) ("C-l" . #'eshell/clear)) :config (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))))) (defun eshell/open (file) (interactive) (find-file file)) :custom (eshell-buffer-maximum-lines 7500)) (use-package shell :bind (:map shell-mode-map ("C-c C-k" . #'comint-clear-buffer)) :custom (shell-command-prompt-show-cwd t) (shell-highlight-undef-enable t) (shell-kill-buffer-on-exit t) (comint-prompt-read-only t)) (provide 'bd--shells) ;;; bd-shells ends here