From cc020903eb05288f993fc0ce9b0119a20c84dbfa Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Mon, 8 Aug 2022 06:32:57 -0800 Subject: [PATCH] Remove useless eshell stuff --- lisp/eshell-settings.el | 44 +---------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/lisp/eshell-settings.el b/lisp/eshell-settings.el index 3361dff..3a34977 100644 --- a/lisp/eshell-settings.el +++ b/lisp/eshell-settings.el @@ -13,49 +13,7 @@ This is taken from a website that I can't remember at the moment." (mapc #'find-file-other-window (mapcar - #'expand-file-name (eshell-flatten-list (reverse args)))))) - -(defun eshell/clear () - "Clear the scrollback buffer, like `clear' in a real shell..." - (eshell/clear-scrollback)) - -(defun eshell/faketty (&rest args) - "USAGE: `faketty ARGS` where ARGS is anything that spews colors. -Credit: https://stackoverflow.com/questions/1401002/how-to-trick-an-application-into-thinking-its-stdout-is-a-terminal-not-a-pipe" - (shell-command-to-string - (format "script -qfc %s /dev/null" args))) - -(defun with-face (str &rest face-plist) - (propertize str 'face face-plist)) -(defun custom-eshell-prompt () - (let* ( - ;; Get the git branch. - (git-branch-unparsed - (shell-command-to-string "git rev-parse --abbrev-ref HEAD 2>/dev/null")) - (git-branch - (if (string= git-branch-unparsed "") - "" - ;; Remove the trailing newline. - (substring git-branch-unparsed 0 -1))) - ) - (concat - ;; Timestamp. - ;; (with-face - ;; (format-time-string "[%a, %b %d | %H:%M:%S]\n" (current-time)) - ;; :inherit font-lock-builtin-face) - ;; Directory. - (with-face (concat (airline-shorten-directory default-directory (/ (window-width) 2)) " ") :inherit font-lock-constant-face) - ;; Git branch. - (unless (string= git-branch "") - (with-face (concat "[" git-branch "]") :inherit font-lock-string-face)) - "\n" - ;; Prompt. - ;; NOTE: Need to keep " $" for the next/previous prompt regexp to work. - (with-face ">" :inherit font-lock-preprocessor-face) - " " - ))) -(setq eshell-prompt-function 'custom-eshell-prompt) -(setq eshell-highlight-prompt nil) + #'expand-file-name (flatten-tree (reverse args)))))) (provide 'eshell-settings) ;;; eshell-settings.el ends here