mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-13 23:51:34 +09:00
emacs : eshell
This commit is contained in:
@ -75,10 +75,10 @@ Otherwise the startup will be very slow. "
|
|||||||
(require 'init-persp)
|
(require 'init-persp)
|
||||||
;; (require 'init-window) ;; will be removed
|
;; (require 'init-window) ;; will be removed
|
||||||
(require 'init-treemacs)
|
(require 'init-treemacs)
|
||||||
;;
|
|
||||||
;;;; shell
|
;; shell
|
||||||
;;(require 'init-eshell)
|
(require 'init-eshell)
|
||||||
;;
|
|
||||||
;;;; markdown
|
;;;; markdown
|
||||||
;;(require 'init-markdown)
|
;;(require 'init-markdown)
|
||||||
;;(require 'init-org)
|
;;(require 'init-org)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
;;; init-eshell.el -*- lexical-binding: t -*-
|
;;; init-eshell.el -*- lexical-binding: t -*-
|
||||||
;; Emacs command shell
|
;; Emacs command shell
|
||||||
(use-package eshell
|
(use-package eshell
|
||||||
:ensure nil
|
:ensure nil ; built-in
|
||||||
:defines eshell-prompt-function
|
:defines eshell-prompt-function
|
||||||
:bind (:map eshell-mode-map
|
:bind (:map eshell-mode-map
|
||||||
([remap recenter-top-bottom] . eshell/clear))
|
([remap recenter-top-bottom] . eshell/clear))
|
||||||
@ -72,43 +72,52 @@
|
|||||||
(eshell-view-file (pop args)))))
|
(eshell-view-file (pop args)))))
|
||||||
(defalias 'eshell/more #'eshell/less))
|
(defalias 'eshell/more #'eshell/less))
|
||||||
|
|
||||||
;;(defun ju/eshell-prompt ()
|
(defun ju/eshell-prompt ()
|
||||||
;; (let ((current-branch (magit-get-current-branch)))
|
(let ((current-branch (magit-get-current-branch)))
|
||||||
;; (concat
|
(concat
|
||||||
;; "\n"
|
"\n"
|
||||||
;; (propertize (system-name) 'face `(:foreground "#62aeed"))
|
(propertize (system-name) 'face `(:foreground "#62aeed"))
|
||||||
;; (propertize " ॐ " 'face `(:foreground "white"))
|
(propertize " ॐ " 'face `(:foreground "white"))
|
||||||
;; (propertize (ju/get-prompt-path) 'face `(:foreground "#82cfd3"))
|
(propertize (ju/get-prompt-path) 'face `(:foreground "#82cfd3"))
|
||||||
;; (when current-branch
|
(when current-branch
|
||||||
;; (concat
|
(concat
|
||||||
;; (propertize " • " 'face `(:foreground "white"))
|
(propertize " • " 'face `(:foreground "white"))
|
||||||
;; (propertize (concat " " current-branch) 'face `(:foreground "#c475f0"))))
|
(propertize (concat " " current-branch) 'face `(:foreground "#c475f0"))))
|
||||||
;; (propertize " • " 'face `(:foreground "white"))
|
(propertize " • " 'face `(:foreground "white"))
|
||||||
;; (propertize (format-time-string "%I:%M:%S %p") 'face `(:foreground "#5a5b7f"))
|
(propertize (format-time-string "%I:%M:%S %p") 'face `(:foreground "#5a5b7f"))
|
||||||
;; (if (= (user-uid) 0)
|
(if (= (user-uid) 0)
|
||||||
;; (propertize "\n#" 'face `(:foreground "red2"))
|
(propertize "\n#" 'face `(:foreground "red2"))
|
||||||
;; (propertize "\nλ" 'face `(:foreground "#aece4a")))
|
(propertize "\nλ" 'face `(:foreground "#aece4a")))
|
||||||
;; (propertize " " 'face `(:foreground "white")))))
|
(propertize " " 'face `(:foreground "white"))))))
|
||||||
|
|
||||||
;;(setq eshell-prompt-function 'ju/eshell-prompt
|
;; (setq eshell-prompt-function 'ju/eshell-prompt
|
||||||
;; eshell-prompt-regexp "^λ ")
|
;; eshell-prompt-regexp "^λ "))
|
||||||
|
|
||||||
|
|
||||||
;; Display extra information for prompt
|
;; Display extra information for prompt
|
||||||
(use-package eshell-prompt-extras
|
(use-package eshell-prompt-extras
|
||||||
:after esh-opt
|
:straight t
|
||||||
:defines eshell-highlight-prompt
|
:ensure t
|
||||||
:autoload (epe-theme-lambda epe-theme-dakrone epe-theme-pipeline)
|
:defer t
|
||||||
:init (setq eshell-highlight-prompt t
|
:after esh-opt
|
||||||
eshell-prompt-function #'epe-theme-lambda))
|
:defines eshell-highlight-prompt
|
||||||
|
:autoload (epe-theme-lambda epe-theme-dakrone epe-theme-pipeline)
|
||||||
|
:init (setq eshell-highlight-prompt t
|
||||||
|
eshell-prompt-function #'epe-theme-lambda))
|
||||||
|
|
||||||
;; `eldoc' support
|
;; `eldoc' support
|
||||||
(use-package esh-help
|
(use-package esh-help
|
||||||
:init (setup-esh-help-eldoc))
|
:straight t
|
||||||
|
:ensure t
|
||||||
|
:defer t
|
||||||
|
:init (setup-esh-help-eldoc))
|
||||||
|
|
||||||
;; `cd' to frequent directory in `eshell'
|
;; `cd' to frequent directory in `eshell'
|
||||||
(use-package eshell-z
|
(use-package eshell-z
|
||||||
:hook (eshell-mode . (lambda () (require 'eshell-z)))))
|
:straight t
|
||||||
|
:ensure t
|
||||||
|
:defer t
|
||||||
|
:hook (eshell-mode . (lambda () (require 'eshell-z))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'init-eshell)
|
(provide 'init-eshell)
|
||||||
|
|||||||
Reference in New Issue
Block a user