From a7c1dbe68ddc0f910c2fdd5a10017a04d3f3683e Mon Sep 17 00:00:00 2001 From: Max Zhao Date: Thu, 25 Jan 2024 12:48:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=20`clash`=20=E5=91=BD?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/init.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/init.sh b/scripts/init.sh index baaaedd..69f92cb 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -217,7 +217,10 @@ if [ -n "$profile" ];then #适配zsh环境变量 [ -n "$(cat /etc/shells 2>/dev/null|grep -oE 'zsh')" ] && [ -z "$(cat ~/.zshrc 2>/dev/null|grep CRASHDIR)" ] && { sed -i '/alias crash=*/'d ~/.zshrc - echo "alias crash=\"$shtype $CRASHDIR/menu.sh\"" >> ~/.zshrc + echo "alias crash=\"$shtype $CRASHDIR/menu.sh\"" >> ~/.zshrc + # 兼容 clash 命令 + sed -i '/alias clash=*/'d ~/.zshrc + echo "alias clash=\"$shtype $CRASHDIR/menu.sh\"" >> ~/.zshrc sed -i '/export CRASHDIR=*/'d ~/.zshrc echo "export CRASHDIR=\"$CRASHDIR\"" >> ~/.zshrc source ~/.zshrc &>/dev/null