From 0819e28a8799f7fe2095bc5691e99b95fdc9c115 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Fri, 14 Jul 2023 20:45:46 +0900 Subject: [PATCH] Avoid to making slower zsh exection --- .config/zsh/.zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index f33d5d77..1783f78d 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -14,7 +14,10 @@ _install_latest_sheldon() { curl --proto '=https' -fLsS https://rossmacarthur.github.io/install/crate.sh | bash -s -- --repo rossmacarthur/sheldon --to "$XDG_DATA_HOME/sheldon/bin" } -(( $+commands[sheldon] )) || _install_latest_sheldon +# Do NOT use (( $+commands[sheldon] )) here. It made 1.5x slower zsh execution :< +if ! type 'sheldon' > /dev/null; then + _install_latest_sheldon +fi eval "$(sheldon source)"