From bb573860bf78016fd572cc3b59ff730a15cdcb65 Mon Sep 17 00:00:00 2001 From: Steven Hobs <47906512+stevenhobs@users.noreply.github.com> Date: Sat, 5 Jul 2025 13:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20lazy.zsh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lazy.zsh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lazy.zsh b/lazy.zsh index 02361f8..d933c35 100644 --- a/lazy.zsh +++ b/lazy.zsh @@ -19,13 +19,9 @@ LAZY_ZSH="$HOME/.lazyzsh" } # Binaries -[[ -d "$LAZY_ZSH/bin" ]] && { - if echo ":$PATH:" | grep -q ":lazyzsh:"; then - source $LAZY_ZSH/bin/.lazy_bin_init.zsh - else - PATH="$LAZY_ZSH/bin:$PATH" - source $LAZY_ZSH/bin/.lazy_bin_init.zsh - fi +[[ -d "$LAZY_ZSH/bin" ]] && ! echo ":$PATH:" | grep -q ":lazyzsh:" && { + PATH="$LAZY_ZSH/bin:$PATH" + source $LAZY_ZSH/bin/.lazy_bin_init.zsh } # ~/.zsh_history @@ -34,10 +30,9 @@ HISTSIZE=1000 SAVEHIST=1000 HISTFILE="$HOME/.zsh_history" -# alias wsl2 profile +# alias wsl2 source "$LAZY_ZSH/alias.zsh" # inner custom alias [[ -n $WSL_DISTRO_NAME ]] && source "$LAZY_ZSH/wsl2.zsh" # wsl custom -[[ -f ~/.profile ]] && source ~/.profile # load bash profile # Proxy Switcher function setproxy() {