Private
Public Access
1
0

feat: 添加启动新 shell 会话的提示

在配置完成后询问用户是否启动新的 shell 会话,
以使环境变量立即生效,解决 "command not found" 问题。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-12 13:54:45 +08:00
parent d2a996df1b
commit e2d0b555b5

View File

@@ -536,6 +536,17 @@ main() {
else
warning "$failed 个工具配置失败"
fi
# 询问是否启动新 shell 以使环境变量生效
echo ""
echo -e "${YELLOW}是否启动新的 shell 会话以使环境变量立即生效? (Y/n)${NC}"
read -r -n 1 start_new_shell
echo ""
if [[ ! "$start_new_shell" =~ ^[Nn]$ ]]; then
info "正在启动新的 shell..."
exec "$SHELL" -l
fi
}
main "$@"