Skip to content

feat: built-in copy Action copies the Project path (ctrl+y) (#66) - #81

Merged
hammadmajid merged 5 commits into
mainfrom
feat/66-copy
Oct 1, 2026
Merged

hammadmajid merged 5 commits into
mainfrom
feat/66-copy

Conversation

@hammadmajid

Copy link
Copy Markdown
Contributor

Closes #66. Part of #61.

What

  • New built-in copy Action on ctrl+y. It copies the Project's absolute path and the Picker stays open, with a green copied <path> on the footer line until the next key press (an error still shows red).
  • action.ClipboardTool picks the first of wl-copy (only with WAYLAND_DISPLAY), xclip -selection clipboard, xsel --clipboard --input, pbcopy; action.Copy pipes the path to it.
  • With none found, the Picker returns tea.SetClipboard(path), so the OSC 52 escape goes out through the running program's own terminal. A detached shell Action could not do that, so copy is handled Go-side via a new Action.Copy flag (set by the built-in only, not a TOML key). A user's run (or jump) clears it, so [actions.copy] run = ... overrides it and key rebinds or unbinds it.
  • picker.Options.Copy is the injectable clipboard function (default action.Copy).
  • README documents it.

Verification

  • Tool order tested with fake PATHs and WAYLAND_DISPLAY; Copy piping, no tool, and tool failure tested.
  • OSC 52 path tested by asserting the Cmd yields tea.setClipboardMsg carrying the path (the escape bytes are bubbletea's).
  • gofmt, go vet, golangci-lint run ./... clean; go test ./... passes apart from the known local-only fish TestScriptExecution cases; binary builds.

@hammadmajid
hammadmajid merged commit a7db0c8 into main Oct 1, 2026
3 checks passed
@hammadmajid
hammadmajid deleted the feat/66-copy branch October 1, 2026 20:38
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.

feat: built-in copy Action copies the Project path (ctrl+y)

1 participant