From 6f483c89dbde37daa7bd89ced0211fbd0c2578f9 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sat, 11 Mar 2023 11:34:45 -0500 Subject: M-x shell settings --- emacs/.config/emacs-kj/init.el | 11 ++++++++++- zsh/.zshrc | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el index e924419..973cecf 100644 --- a/emacs/.config/emacs-kj/init.el +++ b/emacs/.config/emacs-kj/init.el @@ -94,11 +94,18 @@ (emojify-set-emoji-styles '(unicode))) (setq-default show-trailing-whitespace t) -(dolist (mode '(calendar-mode-hook eshell-mode-hook term-mode-hook)) +(dolist (mode '(calendar-mode-hook + eshell-mode-hook + term-mode-hook + comint-mode-hook)) (add-hook mode (lambda (&rest args) (setq show-trailing-whitespace nil)))) +;; `M-x shell` settings +(setq shell-prompt-pattern "^[^#$%>\n]*[#$%>❯] *") +(setq explicit-shell-file-name "zsh") + (use-package rainbow-delimiters :defer t :hook (prog-mode-hook . rainbow-delimiters-mode)) @@ -856,11 +863,13 @@ (seq "*htop*" (* anything)) (seq "*Proced*" (* anything)) (seq "*eshell*" (* anything)) + (seq "*shell*" (* anything)) "*Occur*")) buffer) (with-current-buffer buffer (apply #'derived-mode-p '(magit-mode compilation-mode + shell-mode comint-mode Custom-mode ; For customization fig-commit-mode))))) diff --git a/zsh/.zshrc b/zsh/.zshrc index d3d065a..1d3dbc8 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,3 +1,6 @@ +if [[ ${INSIDE_EMACS} == *comint* ]]; then + TERM=xterm-256color +fi if [[ ${TERM} = "dumb" ]]; then # This fixes TRAMP. unsetopt zle -- cgit v1.2.3