Subject: [bug#37365] [PATCH] Add package zsh-autosuggestions

From: "Collin J. Doering" <[email-masked]>
Date: Mon, 09 Sep 2019 23:14:23 -0400

Add package for zsh-autosuggestions.
>From 5ad67c522f0859544bf8bbcb911cc607724f25cf Mon Sep 17 00:00:00 2001
From: "Collin J. Doering" <[email-masked]>
Date: Mon, 9 Sep 2019 23:08:20 -0400
Subject: [PATCH] gnu: Add zsh-autosuggestions

* gnu/packages/shellutils.scm (zsh-autosuggestions): New variable.

Signed-off-by: Collin J. Doering <[email-masked]>
---
 gnu/packages/shellutils.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index f7542ea759..fd84d353ee 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -228,3 +228,35 @@ commands that are obsolete or contain a piece of sensitive information) or
 bookmark your favourite commands.")
     (home-page "http://me.mindforger.com/projects/hh.html")
     (license license:asl2.0)))
+
+(define-public zsh-autosuggestions
+  (package
+    (name "zsh-autosuggestions")
+    (version "0.6.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/zsh-users/zsh-autosuggestions.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16vbpcsjs5lapp9sb4vnp6yqjc5c0a756p1vn5jsjm7whyfag5kd"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'check)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (install-path (string-append out "/share/zsh/plugins/zsh-autosuggestions")))
+               (mkdir-p install-path)
+               (invoke "make" "all")
+               (copy-file "zsh-autosuggestions.zsh" (string-append install-path "/zsh-autosuggestions.zsh"))))))))
+    (synopsis "Fish-like autosuggestions for zsh")
+    (description
+     "Fish-like fast/unobtrusive autosuggestions for zsh.  It suggests commands as you type.")
+    (home-page "https://github.com/zsh-users/zsh-autosuggestions.git")
+    (license license:expat)))
-- 
2.23.0

-- 
Collin J. Doering

http://rekahsoft.ca
http://blog.rekahsoft.ca
http://git.rekahsoft.ca