Skip to content

UPSTREAM PR #17572: Feat: native clipboard (using arboard)#54

Open
loci-dev wants to merge 6 commits intomainfrom
loci/pr-17572-feat-native-clipboard
Open

UPSTREAM PR #17572: Feat: native clipboard (using arboard)#54
loci-dev wants to merge 6 commits intomainfrom
loci/pr-17572-feat-native-clipboard

Conversation

@loci-dev
Copy link

Note

Source pull request: nushell/nushell#17572

Cross-platform clipboard command

This PR integrates nu_plugin_clipboard into Nushell as a built-in internal command.

Migrating from an external plugin required several changes across the codebase and internal APIs. Because of this, the current implementation may not be completely stable and will likely need further testing and debugging.

This PR prioritizes integration over stability, and additional fixes are expected in follow-up work.

Examples:

# Copy data to the clipboard
~> "data" | clip copy

# Pass through the copied data
~> "data" | clip copy --show | save out.txt

# Retrieve data from the clipboard
~> clip paste

Like the original plugin, it can automatically convert objects and arrays to and from JSON.
This behavior can be disabled using the --raw flag on the paste subcommand.
However, to copy a raw value, you must explicitly cast it to a string.

Note: this feature could be removed to keep the command simpler and aligned with a single-responsibility design, but it's a nice-to-have thing.

Closes: #16242

Tasks after merging

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.

2 participants

Comments