From 576e20682e590cdd6f3136e3a373b8d8e06a7512 Mon Sep 17 00:00:00 2001 From: Tri Vo Khac Date: Fri, 27 Feb 2026 12:30:57 +0700 Subject: [PATCH] refactor: Update zinit plugin configurations to use `atclone` and `atpull` hooks for initialization and completion generation, and adjust plugin-specific options. --- zsh/.config/zsh/.zshrc | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index bfe23c9..007fc3f 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -13,53 +13,58 @@ zinit wait lucid light-mode id-as depth'1' for \ atload'_zsh_autosuggest_start' \ zsh-users/zsh-autosuggestions -zinit id-as from'gh-r' lbin'!' null for \ +zinit id-as from'gh-r' lbin'!' completions for \ lsd-rs/lsd \ micro-editor/micro \ - @sharkdp/bat + mv'**/bat.zsh -> _bat' \ + @sharkdp/bat zinit for \ id-as \ from'gh-r' \ - sbin'!**/bin/fastfetch -> fastfetch' \ + mv'**/bin/fastfetch -> fastfetch' \ + atclone'for dir in fastfetch*/; do rm -rf "$dir"; done' \ + atpull'%atclone' \ + sbin'fastfetch' \ @fastfetch-cli/fastfetch zinit for \ id-as \ - atload'eval "$(zoxide init zsh)"' \ from'gh-r' \ + atclone'./zoxide init zsh > init.zsh' \ + atpull'%atclone' \ lbin'!' \ @ajeetdsouza/zoxide zinit for \ id-as \ - as'completion' \ - atclone'./fnm completions --shell zsh > _fnm.zsh' \ - atload'eval "$(fnm env --use-on-cd --shell zsh)"' \ + from'gh-r' \ + atclone' + ./fnm env --use-on-cd --shell zsh > init.zsh; \ + ./fnm completions --shell zsh > _fnm; + ' \ atpull'%atclone' \ blockf \ - from'gh-r' \ - nocompile \ sbin'fnm' \ @Schniz/fnm zinit for \ id-as \ - as'completion' \ - atclone'./starship completions zsh > _starship' \ - atpull'%atclone' \ - atload'eval "$(starship init zsh)"' \ from'gh-r' \ - sbin'**/starship -> starship' \ + atclone' + ./starship init zsh > init.zsh; \ + ./starship completions zsh > _starship; + ' \ + atpull'%atclone' \ + sbin'starship' \ @starship/starship zinit for \ id-as \ from'gh-r' \ - lbin'!fzf' \ - atclone'./fzf --zsh > fzf.zsh' \ + atclone'./fzf --zsh > init.zsh' \ atpull'%atclone' \ - src'fzf.zsh' \ + lbin'!fzf' \ @junegunn/fzf for script in $ZDOTDIR/config/*.zsh; do