Get rid of lsb-release dependency #16

Merged
pztrn merged 1 commits from hdkv/zsh-config:master into master 2026-06-19 16:12:01 +05:00
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -6,9 +6,9 @@ OS_RELEASE=`uname -r`
OS_ARCH=`uname -m` OS_ARCH=`uname -m`
# Distro detection. # Distro detection.
LSBRELEASE=$(which lsb_release) if [[ -f /etc/os-release ]]; then
if [ $? -eq 0 ]; then . /etc/os-release
DISTRO=`lsb_release -i -s` DISTRO=${ID}
else else
# BSDs OS and macOS can be detected via uname. # BSDs OS and macOS can be detected via uname.
DISTRO=${OS} DISTRO=${OS}
+3 -3
View File
@@ -1,10 +1,10 @@
AUTOSUGGESTIONS_PATH="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh" 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}" = "arch" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
if [ "${DISTRO}" = "EnveavourOS" ]; 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}" == "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}" = "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 [ "${DISTRO}" = "voidlinux" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions.zsh"; fi
if [ -f "${AUTOSUGGESTIONS_PATH}" ]; then if [ -f "${AUTOSUGGESTIONS_PATH}" ]; then
source "${AUTOSUGGESTIONS_PATH}" source "${AUTOSUGGESTIONS_PATH}"