[codex] Open plain URLs inside tmux#8
Merged
Conversation
Ghostty can detect ordinary URL text only when tmux does not consume the mouse event. Because mouse mode is required, tmux now keeps URL punctuation in mouse_word, opens both OSC 8 hyperlinks and plain URL words through a small helper, and forwards non-link clicks back to tmux normally. Constraint: Mouse mode must stay enabled for scrolling, pane selection, and mouse-aware TUIs. Constraint: URL clicks need to work for plain terminal text, not only OSC 8 hyperlinks. Rejected: Disable tmux mouse mode | it would restore terminal-native clicking but break tmux mouse workflows. Rejected: Open every mouse_word | non-URL clicks must preserve normal tmux behavior. Confidence: high Scope-risk: narrow Directive: Keep the MouseDown1Pane fallback path forwarding to tmux when the click is not on a URL. Tested: git diff --cached --check Tested: make check Not-tested: Manual click in a freshly reloaded tmux client. Co-authored-by: OmX <omx@oh-my-codex.dev>
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
http(s),mailto,file,ssh,git, andwww.*links.Root cause
The previous fix handled
#{mouse_hyperlink}only, which works for OSC 8 hyperlinks. Most terminal output prints plain URL text, and with tmux mouse mode enabled Ghostty never receives the click directly. tmux must therefore detect the clickedmouse_wordand open URL-shaped words itself.Validation
git diff --cached --checkmake checkNotes
~/.config/tmuxis already symlinked to this repo, but no tmux server was running from this surface, so I could not live-reload the active client here. After merging/pulling, runtmux source-file ~/.config/tmux/tmux.confin an active tmux session or restart tmux.