-
Notifications
You must be signed in to change notification settings - Fork 318
Closed
Labels
Area-Copy/Paste-LinuxIssues about copy/paste on LinuxIssues about copy/paste on LinuxIssue-EnhancementIt's a feature request.It's a feature request.Resolution-DeclinedThe enhancement request is declined.The enhancement request is declined.
Description
Prerequisites
- Write a descriptive title.
Description of the new feature/enhancement
xclip is hard-coded in https://github.com/PowerShell/PSReadLine/blob/ff4bbd5ee/PSReadLine/Clipboard.cs#L80 and https://github.com/PowerShell/PSReadLine/blob/ff4bbd5ee/PSReadLine/Clipboard.cs#L117 .
Problems:
xclipis not installed by default on Fedora 39- If installed,
xclipis likely to be the cause of Copy, CopyOrCancel and Cut commands hang in Linux until you copy in some other app #3884
Can we expose this as a PSReadLineOption?
Relevant: #1993 - PSReadLine has sucked for a long time at copy-paste on Linux 😥
Proposed technical implementation details (optional)
Any thoughts appreciated, but to get the ball rolling, I think we would likely need:
- CopyTool
- CopyToolArgs
- PasteTool
- PasteToolArgs
I suggest:
-
A single object, to avoid adding 4 parameters:
internal struct ClipboardTool { internal string Copy; internal string[] CopyArgs; internal string Paste; internal string[] PasteArgs; }
-
Stipulate that CopyTool must accept input from the pipeline
-
On Windows, setting the property throws an exception
-
On Linux / Darwin you can do
Set-PSReadlineOption -ClipboardTool @{Copy = 'xsel'; CopyArgs = ('-i', '--clipboard')}- Missing paste args, in this case, are init'd to
xclip/pbcopy(the current defaults)
- Missing paste args, in this case, are init'd to
Metadata
Metadata
Assignees
Labels
Area-Copy/Paste-LinuxIssues about copy/paste on LinuxIssues about copy/paste on LinuxIssue-EnhancementIt's a feature request.It's a feature request.Resolution-DeclinedThe enhancement request is declined.The enhancement request is declined.