Files
zsh-config/zsh/plugins/autosuggestions.plugin.zsh
T
hdkv f655fbf527 Get rid of lsb-release dependency (#16)
У всех линуксов уже давно есть /etc/os-release, и можно на него опираться, упрощая жизнь и уменьшая количество зависимостей для конфига.

Reviewed-on: #16
Reviewed-by: Stanislav Nikitin <pztrn@pztrn.name>
Co-authored-by: Vladimir Hodakov <vladimir@hodakov.me>
Co-committed-by: Vladimir Hodakov <vladimir@hodakov.me>
2026-06-19 16:12:01 +05:00

15 lines
1.0 KiB
Bash

AUTOSUGGESTIONS_PATH="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
if [ "${DISTRO}" = "arch" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
if [ "${DISTRO}" = "endeavouros" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
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
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