]> arthur.barton.de Git - ax-zsh.git/commitdiff
Add "zsh-autosuggestions" plugin
authorAlexander Barton <alex@barton.de>
Wed, 26 Oct 2016 07:45:19 +0000 (09:45 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 26 Oct 2016 07:45:19 +0000 (09:45 +0200)
plugins/zsh-autosuggestions/README.md [new file with mode: 0644]
plugins/zsh-autosuggestions/zsh-autosuggestions.zshrc [new file with mode: 0644]

diff --git a/plugins/zsh-autosuggestions/README.md b/plugins/zsh-autosuggestions/README.md
new file mode 100644 (file)
index 0000000..fa4da32
--- /dev/null
@@ -0,0 +1,4 @@
+## zsh-autosuggestions
+
+Initialize "Fish-like autosuggestions for zsh", see
+https://github.com/zsh-users/zsh-autosuggestions.
diff --git a/plugins/zsh-autosuggestions/zsh-autosuggestions.zshrc b/plugins/zsh-autosuggestions/zsh-autosuggestions.zshrc
new file mode 100644 (file)
index 0000000..6492620
--- /dev/null
@@ -0,0 +1,17 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# zsh-autosuggestions.zshrc: Initialize "Fish-like autosuggestions for zsh"
+
+axzsh_is_dumb_terminal && return 1
+
+for script (
+       "/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
+       "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
+); do
+       if [[ -r "$script" ]]; then
+               source "$script"
+               unset script
+               return 0
+       fi
+done
+unset script
+return 1