Crate terminal_clipboard[][src]

terminal-clipboard is a cross-platform clipboard library focused on strings copy and paste in the terminal:

  • it’s cross-compilation friendly
  • it’s tested on macos, linux, windows and termux
  • it doesn’t support Wayland (because you’re in the terminal)
  • it doesn’t handle other types of objects than strings
  • it doesn’t handle non UTF8 strings

It exposes only two functions, one for reading the clipboard as a string, another one to fill it from a string:

use terminal_clipboard;
terminal_clipboard::set_string("test").unwrap();
assert_eq!("test", terminal_clipboard::get_string().unwrap());

Structs

ClipboardError

Functions

get_string
set_string