Skip to content

feature/enter to execute#22

Merged
cboone merged 7 commits into
mainfrom
feature/enter-to-execute
Feb 9, 2026
Merged

feature/enter to execute#22
cboone merged 7 commits into
mainfrom
feature/enter-to-execute

Conversation

@cboone

@cboone cboone commented Feb 9, 2026

Copy link
Copy Markdown
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.
Copilot AI review requested due to automatic review settings February 9, 2026 02:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh so Enter executes a selected binding (and still toggles groups when a group header is selected).
  • Update popup.sh to detect an emitted command file on viewer exit and execute it via tmux source-file -.
  • Add contributor/testing docs (.claude/CLAUDE.md, plan doc) and a Makefile test target.

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).

Comment thread scripts/popup.sh Outdated
Comment thread .claude/CLAUDE.md
Comment thread scripts/viewer.sh
Comment thread scripts/viewer.sh Outdated
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.
Copilot AI review requested due to automatic review settings February 9, 2026 02:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread scripts/viewer.sh Outdated
Comment thread docs/plans/done/2026-02-08-enter-to-execute-binding.md

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread scripts/viewer.sh
Comment thread docs/plans/done/2026-02-08-enter-to-execute-binding.md
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread docs/plans/done/2026-02-08-enter-to-execute-binding.md
@cboone cboone merged commit a8e1c03 into main Feb 9, 2026
7 checks passed
@cboone cboone deleted the feature/enter-to-execute branch February 9, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants