From b85cb76e293b69b5cbce04143825cd4dff8d4c14 Mon Sep 17 00:00:00 2001 From: Tri Vo Khac Date: Wed, 3 Jul 2024 15:13:17 +0700 Subject: [PATCH] refactor: `.zshrc` --- zsh/.config/zsh/.zshrc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 9fe39dd..6d02363 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -8,34 +8,27 @@ fi source "$ZAP_SCRIPT" -repos=( - # remote plugins +remote_plugins=( zap-zsh/supercharge zap-zsh/fzf - wintermi/zsh-brew wintermi/zsh-lsd wintermi/zsh-fnm zsh-users/zsh-autosuggestions zsh-users/zsh-completions zdharma-continuum/fast-syntax-highlighting hlissner/zsh-autopair - # local plugins - "$ZDOTDIR/aliases.zsh" - "$ZDOTDIR/exports.zsh" - "$ZDOTDIR/eval.zsh" ) -mac_only_repos=(wintermi/zsh-brew) +plugins=("${remote_plugins[@]}" "$ZDOTDIR/*") +mac_plugins=(wintermi/zsh-brew) case "$(uname -s)" in - Darwin) # echo 'Mac OS X' + plugins=("${mac_plugins[@]}" "${plugins[@]}") ;; - Linux) - for repo in $mac_only_repos; do repos=("${repos[@]/$repo}"); done + # echo 'Linux' ;; - CYGWIN* | MINGW32* | MSYS* | MINGW*) # echo 'MS Windows' ;; @@ -44,7 +37,7 @@ CYGWIN* | MINGW32* | MSYS* | MINGW*) ;; esac -for repo in $repos; do plug $repo; done +for plugin in $plugins; do plug $plugin; done # Clean startup prompt [ ! -f ~/.hushlogin ] && touch ~/.hushlogin