Subject: [PATCH 02/21] gnu: emacs-esh-autosuggest: New variable.

From: Pierre Neidhardt <[email-masked]>
Date: Fri, 18 May 2018 20:49:08 +0200

* gnu/packages/emacs.scm (emacs-esh-autosuggest): New variable.
---
 gnu/packages/emacs.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 10bf4c355..b84c58e2e 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -10487,3 +10487,31 @@ daemons (services) for those getting tired of typing out @code{sudo service
 my_thing reload} all the time.  It's offers a consistent UI over different
 init systems.")
     (license license:gpl3+)))
+
+(define-public emacs-esh-autosuggest
+  (package
+    (name "emacs-esh-autosuggest")
+    (version "2.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/dieggsy/esh-autosuggest/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version "-checkout"))
+       (sha256
+        (base32
+         "0swf054vpk2h6285jmibp2wpy1vg5mdlimgjyyzpgwpj6k5xwgdf"))))
+    (build-system emacs-build-system)
+    (propagated-inputs `(("emacs-company" ,emacs-company)))
+    (home-page "https://github.com/dieggsy/esh-autosuggest")
+    (synopsis "Fish-like autosuggestions in Eshell")
+    (description
+     "This package assumes you use something other than company for eshell
+completion (e.g. @code{eshell-pcomplete}, @code{completion-at-point},
+@code{helm-esh-pcomplete}).  @code{company-mode} is used solely as a mechanism
+for history autosuggestions.
+
+Unless you're using @code{use-package}'s hook keyword, you can enable the
+autosuggestions with:
+@code{(add-hook 'eshell-mode-hook #'esh-autosuggest-mode)}")
+    (license license:gpl3+)))
-- 
2.17.0