Files
huhan3000/scripts/test_plugins.sh
ben 1595d7f68e feat: Complete project reorganization
- Reorganize core-theory into 6 thematic subdirectories (01-06)
- Clean up root directory, move files to appropriate locations
- Create comprehensive README files for navigation
- Add new academic papers and research content
- Implement English naming convention for better indexing
- Total: 42 core theory files organized, 7 READMEs created

Key improvements:
- Clear hierarchical structure (foundational → matrix → analysis → empires)
- Better discoverability with detailed navigation guides
- Scalable framework for future content expansion
- AI-friendly organization for indexing and processing
2025-10-21 12:56:11 +00:00

105 lines
2.3 KiB
Bash

#!/bin/bash
echo "=== 插件测试脚本 ==="
echo "逐个测试你的 zsh 插件..."
echo ""
# 测试基本 zsh 功能
echo "1. 测试基本 zsh 功能..."
if zsh -c "echo 'ZSH 基本功能正常'" 2>/dev/null; then
echo "✓ ZSH 基本功能正常"
else
echo "✗ ZSH 基本功能异常"
exit 1
fi
echo ""
echo "2. 测试 Oh My Zsh 核心..."
if zsh -c "source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'Oh My Zsh 核心正常'" 2>/dev/null; then
echo "✓ Oh My Zsh 核心正常"
else
echo "✗ Oh My Zsh 核心异常"
exit 1
fi
echo ""
echo "3. 测试内置插件(逐个)..."
plugins=(
"git"
"docker"
"docker-compose"
"ansible"
"terraform"
"kubectl"
"helm"
"aws"
"gcloud"
"colored-man-pages"
"command-not-found"
"extract"
"history-substring-search"
"sudo"
"systemd"
"tmux"
"vscode"
"web-search"
"z"
)
for plugin in "${plugins[@]}"; do
echo -n "测试插件: $plugin ... "
if zsh -c "plugins=($plugin); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
done
echo ""
echo "4. 测试自定义插件..."
# 测试 zsh-autosuggestions
echo -n "测试 zsh-autosuggestions ... "
if zsh -c "plugins=(zsh-autosuggestions); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
# 测试 zsh-syntax-highlighting
echo -n "测试 zsh-syntax-highlighting ... "
if zsh -c "plugins=(zsh-syntax-highlighting); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
# 测试 zsh-completions
echo -n "测试 zsh-completions ... "
if zsh -c "plugins=(zsh-completions); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
echo ""
echo "5. 测试插件组合..."
# 测试核心插件组合
echo -n "测试核心插件组合 ... "
if zsh -c "plugins=(git docker colored-man-pages extract); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
# 测试自定义插件组合
echo -n "测试自定义插件组合 ... "
if zsh -c "plugins=(zsh-autosuggestions zsh-syntax-highlighting zsh-completions); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
echo ""
echo "插件测试完成!"