graph TD A[终端问题] --> B{Cline 可以执行命令吗?} B -->|否| C[Shell 集成不可用] B -->|是| D{Cline 可以看到输出吗?} D -->|否| E[输出捕获失败] D -->|是| F{输出是否损坏?} F -->|是| G[字符过滤问题] F -->|否| H{命令会挂起吗?} H -->|是| I[长时间运行的命令问题] H -->|否| J[检查终端设置] C --> K[尝试解决方案 1] E --> L[尝试解决方案 2] G --> M[尝试解决方案 3] I --> N[尝试解决方案 4] style A fill:#f9f,stroke:#333,stroke-width:2px style K fill:#9f9,stroke:#333,stroke-width:2px style L fill:#9f9,stroke:#333,stroke-width:2px style M fill:#9f9,stroke:#333,stroke-width:2px style N fill:#9f9,stroke:#333,stroke-width:2px
# 添加到 ~/.zshrc
export TERM=xterm-256color
export PAGER=cat
# 为 VSCode 禁用花哨的提示符
if [[ "$TERM_PROGRAM" == "vscode" ]]; then
PS1="%n@%m %1~ %# "
fi
# 添加到 ~/.bashrc
export TERM=xterm-256color
export PAGER=cat
# VSCode 的简单提示符
if [[ "$TERM_PROGRAM" == "vscode" ]]; then
PS1='\u@\h:\w\$ '
fi
# 添加到 ~/.config/fish/config.fish
set -x TERM xterm-256color
set -x PAGER cat
# 在 VSCode 中禁用花哨的功能
if test "$TERM_PROGRAM" = "vscode"
function fish_prompt
echo (whoami)'@'(hostname)':'(pwd)'> '
end
end