feature/enter to execute#22
Merged
Merged
Conversation
cboone
commented
Feb 9, 2026
Owner
- docs: update CLAUDE
- build: add Makefile with test target
- feat: execute selected binding with Enter
Press Enter on a binding line to close the popup and execute the tmux command. Enter on a group header still toggles collapse. The viewer writes the command to a sidecar file, which the popup shell pipes into tmux source-file after the viewer exits.
There was a problem hiding this comment.
Pull request overview
Adds an “Enter to execute” workflow to the tmux binding viewer so users can run the currently selected binding directly from the popup, plus supporting docs and a simple test Makefile target.
Changes:
- Update
viewer.shso Enter executes a selected binding (and still toggles groups when a group header is selected). - Update
popup.shto detect an emitted command file on viewer exit and execute it viatmux source-file -. - Add contributor/testing docs (
.claude/CLAUDE.md, plan doc) and aMakefiletesttarget.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/viewer.sh | Adds Enter handler to emit selected binding command for execution and updates help text/comments. |
| scripts/popup.sh | Executes emitted command after popup viewer exits. |
| docs/plans/done/2026-02-08-enter-to-execute-binding.md | Documents the design/implementation and manual verification steps. |
| Makefile | Adds make test wrapper for Scrut tests. |
| .claude/CLAUDE.md | Adds repo-specific guidance for contributors/agents (testing, architecture, conventions). |
Resolve conflict in .claude/CLAUDE.md code block language tag.
- Add bounds check to ENTER handler to prevent executing element 0 when VISIBLE array is empty (e.g., no search matches) - Replace echo with printf to avoid mangling commands containing backslash escapes or leading -n - Feed .cmd file directly to tmux source-file instead of echo pipe - Include .cmd file in popup.sh trap for cleanup on interruption
Prevent Copilot from incorrectly flagging the facebookincubator/scrut URL as a mismatch with a nonexistent jorisvink/scrut reference.
Create the command file with mktemp in popup.sh instead of deriving it from the data temp file path. Pass the secure path to viewer.sh as a third argument.
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.