From 1c508c6f3971ee59a108b63975211d551087fb34 Mon Sep 17 00:00:00 2001 From: thek4n Date: Sat, 2 Nov 2024 15:58:32 +0300 Subject: [PATCH] refactor zsh hook --- install-hooks/zsh/post-install | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/install-hooks/zsh/post-install b/install-hooks/zsh/post-install index 0ba72c4..89857fc 100755 --- a/install-hooks/zsh/post-install +++ b/install-hooks/zsh/post-install @@ -1,5 +1,26 @@ #!/usr/bin/env zsh -for zfile in .zshenv .config/zsh/.zshrc .config/zsh/.zprofile .config/zsh/.zlogout .config/zsh/aliases .config/zsh/completion .config/zsh/history .config/zsh/options .config/zsh/other .config/zsh/plugin .config/zsh/calculator .config/zsh/prompt .config/zsh/mappings .config/zsh/sourcer .config/zsh/export .config/zsh/functions; do - zcompile "$HOME/$zfile" +readonly zfiles=( + .zshenv + .config/zsh/.zshrc + .config/zsh/.zprofile + .config/zsh/.zlogout + .config/zsh/aliases + .config/zsh/completion + .config/zsh/history + .config/zsh/options + .config/zsh/other + .config/zsh/plugin + .config/zsh/calculator + .config/zsh/prompt + .config/zsh/mappings + .config/zsh/sourcer + .config/zsh/export + .config/zsh/functions +) + + +for zfile in "${zfiles[@]}" +do + zcompile "${HOME}/${zfile}" done \ No newline at end of file