SuperAPI AI 工具集

setup-tmux

设计与创作

查看项目

更新于 10-15 16:48

技能介绍

用途:分析并配置 tmux,使其与 Amp CLI 最佳兼容,主要用于排查图片、剪贴板、超链接、通知、焦点事件及 Shift+Enter 等问题。

主要能力:检查 tmux 配置文件($XDG_CONFIG_HOME/tmux/tmux.conf、~/.config/tmux/tmux.conf、~/.tmux.conf,可用 tmux display -p '#{config_files}' 确认实际加载文件),核对 allow-passthrough、focus-events、terminal-features 超链接、set-clipboard、extended-keys 及 S-Enter 绑定等运行时选项,报告缺失项对 Amp 功能的影响,并应用修复。

所需配置: set -g allow-passthrough all set -g focus-events on set -ga terminal-features ",*:hyperlinks" set -s set-clipboard on set -s extended-keys on bind -n S-Enter send-keys -l "\x1b[13;2u"

Amp 期望 Shift+Enter 为 CSI-u 序列 ESC [ 13 ; 2 u,缺绑定时常被折叠为普通 Enter。

iTerm2 兼容:需在 Settings > Profiles > Keys > Key Mappings 为 Shift+Enter 添加 Send Escape Sequence,值为 [13;2u;tmux 侧仍需 extended-keys on 与上述绑定。

使用方式:先定位并分析配置,报告各项状态与受影响功能,询问用户选择写入配置文件永久生效或运行时临时应用(tmux set/tmux bind 命令),最后用 tmux list-keys | grep 'S-Enter' 及在 Amp 编辑器中按 Shift+Enter 验证换行。

限制:部分内容(如收费、平台支持)资料未提供;临时变更在 tmux 服务重启后失效。