Improved Eshell module part 1

Added a README file detailing the Eshell module, a few minor tweaks to
the config, some keybindings, and the eshell-did-you-mean package.

More to come!
This commit is contained in:
Steven vanZyl 2020-04-17 15:48:54 -04:00
parent 5c340a670c
commit a9d7fc099d
3 changed files with 61 additions and 1 deletions

View file

@ -0,0 +1,45 @@
#+TITLE: term/eshell
#+DATE: April 17, 2020
#+SINCE: {replace with next tagged release version}
#+STARTUP: inlineimages nofold
* Table of Contents :TOC_3:noexport:
* Description
This module provides additional features for the built-in [[https://www.gnu.org/software/emacs/manual/html_mono/eshell.html][Emacs Shell]]
The Emacs Shell or =eshell= is a shell-like command interpreter implemented in
Emacs Lisp. It is an alternative to traditional shells such as =bash=, =zsh=,
=fish=, etc. that is built into Emacs and entirely cross-platform.
** Maintainers
This module has no dedicated maintainers.
** Module Flags
This module provides no flags, but does gain auto-completion if =:completion
company= is enabled.
** Plugins
+ [[https://github.com/peterwvj/eshell-up][eshell-up]]
+ [[https://github.com/xuchunyang/eshell-z][eshell-z]]
+ [[https://github.com/tom-tan/esh-help][esh-help]]
+ [[https://gitlab.com/bennya/shrink-path.el][shrink-path]]
+ [[https://github.com/xuchunyang/eshell-did-you-mean][eshell-did-you-mean]]
+ =:completion company=
+ [[https://gitlab.com/ambrevar/emacs-fish-completion][fish-completion]]
+ [[https://github.com/szermatt/emacs-bash-completion][bash-completion]]
* Prerequisites
This module has no prerequisites.
* Features
+ Command completion with Company
+ =fish=-style prompt with Git integration
+ [[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.
* TODO Troubleshooting
# Common issues and their solution, or places to look for help.

View file

@ -82,6 +82,10 @@ 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)
@ -152,7 +156,13 @@ You should use `set-eshell-alias!' to change this.")
[remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input
[remap evil-delete-back-to-indentation] #'eshell-kill-input
[remap evil-window-split] #'+eshell/split-below
[remap evil-window-vsplit] #'+eshell/split-right))))
[remap evil-window-vsplit] #'+eshell/split-right
;; Local-leader keybindings
(:localleader
"b" #'eshell-insert-buffer-name
"e" #'eshell-insert-envvar
"s" #'+eshell/search-history)))))
(use-package! eshell-up
@ -183,3 +193,7 @@ You should use `set-eshell-alias!' to change this.")
(defadvice! +eshell--fallback-to-bash-a (&rest _)
:before-while #'fish-completion--list-completions-with-desc
(executable-find "fish")))
;; Active eshell-did-you-mean using its setup function which provides
;; its own hooks.
(eshell-did-you-mean-setup)

View file

@ -5,6 +5,7 @@
(package! eshell-z :pin "337cb241e1")
(package! shrink-path :pin "c14882c859")
(package! esh-help :pin "417673ed18")
(package! eshell-did-you-mean :pin "7cb6ef")
(when (featurep! :completion company)
(package! fish-completion :pin "1038488181")