OneLook
Home首页 · Docs文档 · Semantic layer语义交互层

Semantic Interaction Layer语义交互层

Click paths, SHAs, and ports — not just prettier highlights.点路径、SHA、端口 —— 不只是更好看的高亮。

v1 · Cmd-click · Smart Selection · Semantic History

Triggers already color ERROR / WARN / SUCCESS. The semantic layer adds the next step: open or act on the string under the cursor. It ships with every iTerm2 profile from this kit (free and paid) — same delivery path as Triggers.Triggers 已经给 ERROR / WARN / SUCCESS 上色。语义层补的是下一步:对光标下的字符串点开或执行动作。随本套装每一份 iTerm2 Profile 交付(开源版与付费版都有)—— 和 Triggers 同一条交付路径。

Try it in 30 seconds30 秒试一遍

semantic
$ ./theme.sh # redeploy current theme if you just upgraded刚升级就先重部署当前主题
# Then Cmd+T — Smart Selection only applies to new tabs然后 Cmd+T —— Smart Selection 只对新 tab 生效
$ echo src/app.ts:42
$ echo a1b2c3d
$ echo localhost:3000
  • Cmd-click src/app.ts:42 → opens in your best local editor (Cursor / VS Code / …).Cmd-click src/app.ts:42 → 用本机最佳编辑器打开(Cursor / VS Code …)。
  • Cmd-click a Git SHA → runs git show --stat (right-click also offers Copy).Cmd-click Git SHA → 跑 git show --stat(右键还可 Copy)。
  • Cmd-click localhost:3000 → opens the browser.Cmd-click localhost:3000 → 打开浏览器。
  • Quad-click selects the whole semantic span (Smart Selection).四击按 Smart Selection 选中整段语义串。

What matches匹配什么

Match匹配First action (Cmd-click)第一条动作(Cmd-click)Also in menu右键还可
path/file.ext:42 · :42:8Open at line打开到行Copy path:line
Git SHA [0-9a-f]{7,40}git show --statCopy SHA
localhost:3xxx · 127.0.0.1:…Open in browser浏览器打开Copy host:port

Stock iTerm2 rules (Paths, HTTP URL, email, …) stay in the same list. Setting Smart Selection Rules replaces inheritance, so the generator embeds the factory set plus these product rules.iTerm2 出厂规则(Paths、HTTP URL、邮箱…)留在同一份列表里。写了 Smart Selection Rules 会整表替换继承,所以生成器必须自带出厂组 + 产品规则。

iTerm2 only Semantic layer uses iTerm2 Smart Selection + Semantic History. Ghostty / Warp / cmux / Tabby / Terminal.app have no equivalent — same honesty as Triggers. Paid multi-terminal sync is about palette look, not clickable semantics.语义层依赖 iTerm2 的 Smart Selection + Semantic History。Ghostty / Warp / cmux / Tabby / 自带终端没有对应物 —— 和 Triggers 同一条诚实边界。付费多终端同步管的是配色观感,不是可点语义。

If Cmd-click does nothingCmd-click 没反应时

  1. Open a new tab after ./theme.sh (old sessions keep the old rule set)../theme.sh 之后新开 tab(老会话还留着旧规则集)。
  2. Check the dashboard: ./doctor.sh --statussemantic should show product rules and SH=best editor.先看仪表盘:./doctor.sh --status —— semantic 行应有产品规则和 SH=best editor
  3. Cmd-click must be on: CommandSelection=YES (pinned by ./setup-gui.sh).Cmd-click 必须开着:CommandSelection=YES./setup-gui.sh 会钉住)。
  4. Install an editor iTerm2 recognizes (VS Code / Cursor / …) so “best editor” has somewhere to go.装一个 iTerm2 认得出的编辑器(VS Code / Cursor …),「最佳编辑器」才有地方可去。