Crates.io | bp |
lib.rs | bp |
version | 0.1.5 |
source | src |
created_at | 2022-04-13 05:08:24.555659 |
updated_at | 2024-10-04 19:04:29.549258 |
description | cross-platform clipboard tool |
homepage | https://github.com/printfn/bp |
repository | https://github.com/printfn/bp |
max_upload_size | |
id | 566806 |
size | 58,115 |
bp
("better paste") is a cross-platform clipboard tool written in Rust, based on
cb.
It can automatically detect whether to copy or paste, and is
optimised to work in pipes. Its behaviour is based on the
tee
command.
bp
is on
crates.io, so you can install
it by running:
cargo install bp
# copy some text
echo "some text" | bp
# copy the HTML from `example.com`
curl https://example.com | bp
# copy the contents of `file.txt`
bp file.txt
# you can also pipe in a file
bp <file.txt
# paste to standard output
bp
# paste to a pipe
bp | jq | less
# paste to `out.txt`
bp >out.txt
# remove formatting from copied text
bp | bp
# prettify, copy and view `example.json`
cat example.json | jq | bp | less
# edit your current clipboard
bp | vipe | bp
# hex-encode contents of the clipboard
bp | xxd | bp
# copy some text with whitespace stripped
echo " some text " | bp -s
# paste to standard output with whitespace stripped
bp -s
some text%
bp
is available under the GPL-3.0-or-later
.