]> arthur.barton.de Git - ax-zsh.git/blobdiff - plugins/zsh-autosuggestions/zsh-autosuggestions.zshrc
Add "zsh-autosuggestions" plugin
[ax-zsh.git] / plugins / zsh-autosuggestions / zsh-autosuggestions.zshrc
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