From 85cf7a794b465ec4d0a9aa08552e81804072fb46 Mon Sep 17 00:00:00 2001 From: Steven vanZyl Date: Tue, 28 Apr 2020 09:35:06 -0400 Subject: [PATCH] Fixes from PR feedback This contains fixes suggested by Henrik as feedback from the initial PR, including updating and correcting the Eshell module README, and few tweaks to the module configuration, and properly pinning eshell-did-you-mean. --- modules/completion/company/config.el | 2 +- modules/term/eshell/README.org | 15 ++++++++++++--- modules/term/eshell/config.el | 10 +++------- modules/term/eshell/packages.el | 2 +- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index 62a1a4f52..c44adb444 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -10,7 +10,7 @@ company-tooltip-align-annotations t company-require-match 'never company-global-modes - '(not erc-mode message-mode help-mode gud-mode eshell-mode) + '(not erc-mode message-mode help-mode gud-mode) company-backends '(company-capf) company-frontends '(company-pseudo-tooltip-frontend company-echo-metadata-frontend)) diff --git a/modules/term/eshell/README.org b/modules/term/eshell/README.org index 8d9f63adf..de43e43f8 100644 --- a/modules/term/eshell/README.org +++ b/modules/term/eshell/README.org @@ -1,9 +1,17 @@ #+TITLE: term/eshell -#+DATE: April 17, 2020 -#+SINCE: {replace with next tagged release version} +#+DATE: May 18, 2020 +#+SINCE: v2.0 #+STARTUP: inlineimages nofold * Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] * Description This module provides additional features for the built-in [[https://www.gnu.org/software/emacs/manual/html_mono/eshell.html][Emacs Shell]] @@ -30,7 +38,8 @@ company= is enabled. + [[https://github.com/szermatt/emacs-bash-completion][bash-completion]] * Prerequisites -This module has no prerequisites. +[[https://fishshell.com/][=fish= shell]] for completions, falling back to [[https://www.gnu.org/software/bash/][=bash= shell]] if =fish= is not +found. If neither shell is found, completions may not be available. * Features + Command completion with Company diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 51afe2b15..d58ce2bd6 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -82,10 +82,6 @@ You should use `set-eshell-alias!' to change this.") ;; Enable autopairing in eshell (add-hook 'eshell-mode-hook #'smartparens-mode) - ;; Comapny completion integration - (when (featurep! :completion company) - (add-hook 'eshell-mode-hook #'company-mode)) - ;; Persp-mode/workspaces integration (when (featurep! :ui workspaces) (add-hook 'persp-activated-functions #'+eshell-switch-workspace-fn) @@ -157,8 +153,6 @@ You should use `set-eshell-alias!' to change this.") [remap evil-delete-back-to-indentation] #'eshell-kill-input [remap evil-window-split] #'+eshell/split-below [remap evil-window-vsplit] #'+eshell/split-right - - ;; Local-leader keybindings (:localleader "b" #'eshell-insert-buffer-name "e" #'eshell-insert-envvar @@ -196,4 +190,6 @@ You should use `set-eshell-alias!' to change this.") ;; Active eshell-did-you-mean using its setup function which provides ;; its own hooks. -(eshell-did-you-mean-setup) +(use-package! eshell-did-you-mean + :after eshell + :config (eshell-did-you-mean-setup)) diff --git a/modules/term/eshell/packages.el b/modules/term/eshell/packages.el index 0d287a889..1ca415927 100644 --- a/modules/term/eshell/packages.el +++ b/modules/term/eshell/packages.el @@ -5,7 +5,7 @@ (package! eshell-z :pin "337cb241e1") (package! shrink-path :pin "c14882c859") (package! esh-help :pin "417673ed18") -(package! eshell-did-you-mean :pin "7cb6ef") +(package! eshell-did-you-mean :pin "7cb6ef8e22") (when (featurep! :completion company) (package! fish-completion :pin "1038488181")