aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin J. Doering <collin@rekahsoft.ca>2019-09-12 17:09:07 -0400
committerEfraim Flashner <efraim@flashner.co.il>2019-09-13 15:39:34 +0300
commit8ebd56ea75768cf7acda877bd294ff0dd3a1809d (patch)
tree7972eaba39a813f7a613d252adf7c9126f1873cd
parent9c4cb1ef4cbd4ea95eb2c73b0fcdf893062b53d1 (diff)
downloadpatches-8ebd56ea75768cf7acda877bd294ff0dd3a1809d.tar
patches-8ebd56ea75768cf7acda877bd294ff0dd3a1809d.tar.gz
gnu: Add zsh-autosuggestions.
* gnu/packages/shellutils.scm (zsh-autosuggestions): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r--gnu/packages/shellutils.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index f901eaaa8f..a5fadd9343 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -34,11 +34,60 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages tmux)
+ #:use-module (gnu packages shells)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system python))
+(define-public zsh-autosuggestions
+ (package
+ (name "zsh-autosuggestions")
+ (version "0.6.3")
+ (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
+ "1h8h2mz9wpjpymgl2p7pc146c1jgb3dggpvzwm9ln3in336wl95c"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("ruby" ,ruby)
+ ("ruby-byebug" ,ruby-byebug)
+ ("ruby-pry" ,ruby-pry)
+ ("ruby-rspec" ,ruby-rspec)
+ ("ruby-rspec-wait" ,ruby-rspec-wait)
+ ("tmux" ,tmux)
+ ("zsh" ,zsh)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'check ; Tests use ruby's bundler; instead execute rspec directly.
+ (lambda _
+ (setenv "TMUX_TMPDIR" (getenv "TMPDIR"))
+ (setenv "SHELL" (which "zsh"))
+ (invoke "rspec")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (zsh-plugins
+ (string-append out "/share/zsh/plugins/zsh-autosuggestions")))
+ (invoke "make" "all")
+ (install-file "zsh-autosuggestions.zsh" zsh-plugins)
+ #t))))))
+ (home-page "https://github.com/zsh-users/zsh-autosuggestions")
+ (synopsis "Fish-like autosuggestions for zsh")
+ (description
+ "Fish-like fast/unobtrusive autosuggestions for zsh. It suggests commands
+as you type.")
+ (license license:expat)))
+
(define-public sh-z
(package
(name "sh-z")