From 67ca6b8bd8eedb50d178b9d9124d18875fd23b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ellis=20Keny=C5=91?= Date: Mon, 22 Feb 2021 06:29:57 +0000 Subject: [PATCH 1/2] Set default eshell TERM --- modules/term/eshell/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index b9fa44350..9e348cc96 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -90,6 +90,7 @@ You should use `set-eshell-alias!' to change this.") ;; UI enhancements (add-hook! 'eshell-mode-hook + (setenv "TERM" "xterm-256color") (defun +eshell-remove-fringes-h () (set-window-fringes nil 0 0) (set-window-margins nil 1 nil)) From 7ec18961b006ec36f6229f4c7bf86bc0cded9a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ellis=20Keny=C5=91?= Date: Tue, 23 Feb 2021 19:38:31 +0000 Subject: [PATCH 2/2] Migrate term to variable and add README note --- modules/term/eshell/README.org | 8 ++++++-- modules/term/eshell/config.el | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/term/eshell/README.org b/modules/term/eshell/README.org index ad3c5878b..066a71f46 100644 --- a/modules/term/eshell/README.org +++ b/modules/term/eshell/README.org @@ -12,6 +12,7 @@ - [[#prerequisites][Prerequisites]] - [[#features][Features]] - [[#configuration][Configuration]] + - [[#term-name][TERM name]] - [[#troubleshooting][Troubleshooting]] * Description @@ -54,8 +55,11 @@ found. If neither shell is found, completions may not be available. + [[https://github.com/rupa/z][=z=]]-like directory jumping + Command-not-found recommendations -* TODO Configuration -# How to configure this module, including common problems and how to address them. +* Configuration +** TERM name +By default, =eshell= sets the =$TERM= variable to ="xterm-256color"=, which helps with +rendering various colours. As eshell is /not/ a terminal emulator, these will not +always work 100%. Modifying =eshell-term-name= to your liking may help. * TODO Troubleshooting # Common issues and their solution, or places to look for help. diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 9e348cc96..e9ddce2c4 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -71,7 +71,9 @@ You should use `set-eshell-alias!' to change this.") eshell-prompt-function #'+eshell-default-prompt-fn ;; em-glob eshell-glob-case-insensitive t - eshell-error-if-no-glob t) + eshell-error-if-no-glob t + ;; Shell config + eshell-term-name "xterm-256color") ;; Consider eshell buffers real (add-hook 'eshell-mode-hook #'doom-mark-buffer-as-real-h) @@ -90,7 +92,6 @@ You should use `set-eshell-alias!' to change this.") ;; UI enhancements (add-hook! 'eshell-mode-hook - (setenv "TERM" "xterm-256color") (defun +eshell-remove-fringes-h () (set-window-fringes nil 0 0) (set-window-margins nil 1 nil))