Skip to content

feat(tui): add 'o' to launch highlighted entry in OS default app - #10

Merged
mondial7 merged 1 commit into
mainfrom
feat/open-key
May 11, 2026
Merged

feat(tui): add 'o' to launch highlighted entry in OS default app#10
mondial7 merged 1 commit into
mainfrom
feat/open-key

Conversation

@mondial7

@mondial7 mondial7 commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds an o keybinding that hands the cursor's path to the OS default opener (open / xdg-open / rundll32 url.dll,FileProtocolHandler). The spawned child is detached so the TUI stays responsive.
  • Parent .. entry is skipped; opener failures surface on the existing status line.
  • Updates the in-app footer, README keybindings table + landing page, and rewrites the README Security section to reflect that mira can now trigger the OS opener (it still never reads file contents itself).
  • Suggested by @GiacoAndCo.

Test plan

  • go vet ./...
  • go test ./... (incl. 4 new cases: file open, dir open, parent skip, error surface)
  • gofmt -s -l .
  • golangci-lint run ./... (v2.12.2, 0 issues)
  • Smoke-test in a terminal: highlight a file → press o → confirm the default app launches; highlight .. → confirm no-op

Wires a new keybinding through handleKey that hands the cursor's path
to `open` / `xdg-open` / `rundll32` depending on platform. The parent
".." entry is skipped, opener errors surface through the existing
status line, and the spawned child is detached so the TUI keeps
running. Updates the footer help, README keybindings table, landing
page, and Security section to reflect the new posture (mira still
never reads file contents itself).
@mondial7
mondial7 merged commit 9efbd06 into main May 11, 2026
7 checks passed
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.

1 participant