Skip to content

Experimental Option Tracking: native-clip #17665

Open

Description

@cptpiepmatz

Identifier

native-clip

Introducing PR

#17664

Status

opt-in

Description

This option adds alternatives to the std/clip module by providing built-in clip copy and clip paste commands that use native API instead of the OSC52 codes.

Related

Activity

  1. added
    category:experimental-option
    on Feb 27, 2026
  2. changed the title [-]Native Clipboard Commands[/-] [+]Experimental Option Tracking: native-clip[/+] on Feb 27, 2026
  3. SnowSquire commented on Mar 22, 2026

    @SnowSquire

    Currently clip copy only supports plain text, but arboard already supports HTML, images, and file lists: https://github.com/1Password/arboard/blob/0a73f82d454eff18f3423c8fd9b89477a17281aa/src/lib.rs#L182-L207

    I think you should be able to choose how the data is interpreted with flags, defaulting to plain text if no flag is provided.

    --html

    Simple since it's just text

    	"<h1>Hello World</h1>" | clip copy --html

    --image

    	open hotdog.jpg | into binary | clip copy --image
    	open screenshot.png | into binary | clip copy --image 

    I'm not sure how the ImageData works in arboard and it might require parsing the image format in nushell, image support is also separate compile time feature which may need to be enabled.
    --file

    	# Multiple files
    	[ ./doc.pdf ./backup.zip ] | clip copy --file
    	
    	# Single file
    	[ ./doc.pdf ] | clip copy --file

    Accepting only lists is aligned with the arboard api but it could also accept a single string of the file's path

    I'm not a capable rust dev so I couldn't implement this

  4. fdncred commented on Mar 23, 2026

    @fdncred
    Contributor

    ya, flag would help.

  5. cptpiepmatz commented on Mar 23, 2026

    @cptpiepmatz
    MemberAuthor

    From my point of view do we need something that is a bit lower level than arboard, because there is no universal "some binary" format, so for these at least we need something custom it seems. I started working on this https://github.com/cptpiepmatz/nushell/tree/nu-clip/crates/nu-clip as a native implementation but that is requiring completely native implementations, I hope we can find something that allows custom formats without having us to implement the entirety of native clipboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:experimental-option

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions