1
0
Fork 0

bin: Merge clipboard wrappers

This commit is contained in:
Jeremy Kaplan 2026-04-11 22:52:26 -04:00
commit 303c3ab55e
9 changed files with 108 additions and 20 deletions

10
bin/cbedit Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
# Somehow (last observed on a Mac), this pipeline ends up with a bunch of
# newlines at the end that make pasting it annoying. Use sed to remove all
# trailing newlines.
#
# https://stackoverflow.com/a/7359879/2472163
cbpaste | vipe | sed -e :a -e '/^\n*$/{$d;N;};/\n$/ba' | cbcopy