Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make clipboard utility configurable #3885

Copy link
Copy link
@fsackur

Description

@fsackur
Issue body actions

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:

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)
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.