A nushell plugin for interacting with the clipboard, allowing you to copy/paste text, objects, and tables.
-
clipboard copy
: Copies input text to the clipboard.- Daemon Behavior: Since version 0.100.1, the daemon is always enabled on Linux. To disable it, set:
$env.config.plugins.clipboard.NO_DAEMON = true
- To make this setting permanent, add it to your
config env
. (I do not recommend changing this unless needed, please create an issue)
- Daemon Behavior: Since version 0.100.1, the daemon is always enabled on Linux. To disable it, set:
-
clipboard paste
: Retrieves the current clipboard content.
echo "test value" | clipboard copy
clipboard paste | echo $in
- Tables and objects are internally converted to JSON.
- When pasting,
clipboard paste
tries to parse JSON into a table or object. - If parsing fails, the content is returned as a string.
$env | clipboard copy
clipboard paste
ps | clipboard copy
clipboard paste
🚀 Recommended: Using nupm
This method automatically handles dependencies and features:
git clone https://github.com/FMotalleb/nu_plugin_clipboard.git
nupm install --path nu_plugin_clipboard -f
use-wayland
: Prioritizes the Wayland API, but falls back to X11 if needed.enforce-daemon
: (Deprecated) Now always enabled on Linux. Disable with:$env.config.plugins.clipboard.NO_DAEMON = true
git clone https://github.com/FMotalleb/nu_plugin_clipboard.git
cd nu_plugin_clipboard
cargo build -r
plugin add target/release/nu_plugin_clipboard
cargo install --git https://github.com/FMotalleb/nu_plugin_clipboard.git
plugin add ~/.cargo/bin/nu_plugin_clipboard
- Since I live in Iran and crates.io won't let me update my packages like a normal person, most of the time crates.io is outdated.
cargo install nu_plugin_clipboard
plugin add ~/.cargo/bin/nu_plugin_clipboard