Repository navigation
馃悰 fix pass -c clipboard on Linux/X11, add tmux integration - #19
Merged
Merged
Conversation
pkg/filesystem.CopyToClipboard hard-coded the Windows-only `clip` command, so `pass -c` failed unconditionally on every non-Windows platform with "exec: \"clip\": executable file not found in $PATH", despite the tool advertising cross-platform clipboard support. - Replace the Windows-only implementation with github.com/atotto/clipboard (already an indirect dependency, now promoted to direct), which uses xclip/xsel on X11, wl-copy on Wayland, pbcopy on macOS, and clip.exe on Windows. - When running inside tmux (TMUX env var set), also load the password into a dedicated tmux paste buffer via `tmux load-buffer -w -b pass -`, so `pass -c` still works over SSH sessions with no X11/Wayland display reachable by a system clipboard utility. The -w flag additionally forwards the buffer to the terminal's clipboard via OSC 52 when tmux's set-clipboard option and the terminal support it. - Fail with a clear, actionable error when no clipboard utility and no tmux session are available, instead of a confusing exec error. - Update fs_test.go clipboard availability checks and add tmux detection and tmux paste-buffer integration tests (self-skip outside tmux). - Supersede AD-005 in the decision log with AD-012; update CHANGELOG, README, and add specs/008-linux-clipboard-fix/spec.md. Verified manually end-to-end in this environment's real tmux session (no X server): `pass -c` succeeds and the password is retrievable via `tmux show-buffer -b pass`.
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.
replaced windows-only clipboard support with support for linux, and with direct support for tmux when running inside tmux