feat: tmux ポップアップで現在セッションのペインを一覧・ジャンプ#19
Merged
Conversation
Stage: implementation — new bin/tmux-claude-picker + prefix+g binding 複数の Claude Code / Codex セッションを並行運用すると「どのペインがどの作業か」 を見失うため、prefix+g で fzf ポップアップを開き現在セッションのウィンドウ/ペインを 一覧してジャンプできるようにする。pane_title の稼働グリフ(✳/braille)を主・semver /codex* cmd を従に AI ペインを CC/CX タグ付けし、右にスクロールバックをプレビュー。 スコープは現在セッションのみ(他セッションはオーケストレーションが立てるアイドル シェルが大半でノイズになるため)。ウィンドウ番号を先頭に昇順表示し、分割ウィンドウの 2ペイン目以降は連結子でぶら下げる。AI 判定は .tmux.conf の automatic-rename-format と同じヒューリスティックで、クロス参照コメントを両方に記載。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stage: hardening — applied after a security/bug second-opinion review (Codex + Claude)
セカンドオピニオン(Codex/Claude)のレビュー指摘に対応。RCE は無かったが中リスク1件+
低リスク数件を修正:
- pane_title / pane_current_path は OSC タイトルやディレクトリ名経由で任意値になり得る。
改行を含むと `tmux -F` 出力が複数行に割れ、fzf に偽候補行を注入できた(fold が read の
後にあり \n 除去は死コードだった)。read 後に pane_id(%N) を検証して分割フラグメント行を
破棄。複数行タイトルで一覧が壊れる潜在バグも同時に解消。
- 表示文字列から C0 制御文字(ESC/CR/tab 等)を除去し、ANSI/カーソル制御による表示
スプーフィングを防止。
- fzf reload バインド内で $SELF を引用(空白/メタ文字を含むパスでの破綻防止)。
- 選択〜ジャンプ間でペインが閉じた場合に select-window/select-pane を握り、set -e に
よる粗い異常終了を回避。
なお tmux 側 `#{s/...}` での正規化案は 3.5a で制御文字に非対応(\t 非エスケープ /
[[:cntrl:]] が空)を実機確認したため不採用、シェル側で対応した。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a tmux+fzf popup picker to list panes in the current tmux session, tag likely Claude/Codex panes (CC/CX), preview scrollback, and jump focus to the selected pane via a new prefix + g binding in this dotfiles repo.
Changes:
- Add
bin/tmux-claude-picker: lists panes for the current session, runsfzfwith scrollback preview, and jumps to the chosen pane. - Add
.tmux.confkeybind:prefix + gopens the picker viadisplay-popupusing an absolute script path.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bin/tmux-claude-picker |
New bash utility to list/preview panes in the current session and jump to a selected pane via fzf. |
.tmux.conf |
Adds prefix + g popup binding that launches the new picker script. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prefix + gで fzf ポップアップを開き、現在セッションのウィンドウ/ペイン一覧から Claude/Codex を識別してジャンプできるbin/tmux-claude-pickerを追加pane_titleの稼働グリフ(✳/braille)を主・semver/codex* cmd を従に CC/CX タグ付け-S -200)をプレビュー、ウィンドウ番号先頭・昇順・分割ウィンドウは└でぶら下げ表示$SELF引用、レースガード)Test plan
prefix + g(C-Space → g)でポップアップが開くCCタグ・稼働グリフが付くEnterで該当ペインへフォーカス移動ctrl-rで一覧を更新make lint(shellcheck -x)が my 2 files に指摘なしmake validateが OKRefs #18
🤖 Generated with Claude Code