zsh-config/zsh/plugins/autosuggestions.plugin.zsh

14 lines
934 B
Bash
Raw Normal View History

2023-07-04 21:36:02 +05:00
AUTOSUGGESTIONS_PATH="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
2021-04-03 17:01:19 +05:00
if [ "${DISTRO}" = "Arch" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
2021-08-22 15:37:00 +05:00
if [[ "${DISTRO}" = "Darwin" && "${OS_ARCH}" == "arm64" ]]; then AUTOSUGGESTIONS_PATH="/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
if [[ "${DISTRO}" = "Darwin" && "${OS_ARCH}" == "x86_64" ]]; then AUTOSUGGESTIONS_PATH="/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
2021-04-03 17:01:19 +05:00
if [ "${DISTRO}" = "VoidLinux" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions.zsh"; fi
if [ -f "${AUTOSUGGESTIONS_PATH}" ]; then
source "${AUTOSUGGESTIONS_PATH}"
export PLUGIN_ZSH_AUTOSUGGESTIONS_LOADED=1
else
echo "Autosuggestions plugin enabled but not installed. Please install zsh-autosuggestions as per https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md"
fi