From e819980da0b92c3981ecb697e999d7cec633ab76 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 10 Oct 2023 18:32:07 +0200 Subject: fixed: plugins not working on debian --- config/essentials/zsh/.zshrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'config/essentials/zsh/.zshrc') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 5e1e838..4212db7 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -27,8 +27,18 @@ compinit # Source files . $ZDOTDIR/functions.zsh . $ZDOTDIR/aliases.sh -. /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -. /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh + +local PLUGPATH +for file in /etc/os-release /usr/lib/os-release +do [ -f "$file" ] && . "$file" && break +done +case "${ID:=unknown}" in + debian|ubuntu) PLUGPATH=/usr/share/ ;; + *) PLUGPATH=/usr/share/zsh/plugins ;; +esac +echo $PLUGPATH +. $PLUGPATH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +. $PLUGPATH/zsh-autosuggestions/zsh-autosuggestions.zsh bindkey -v bindkey -a cs change-surround -- cgit v1.2.3