463 current 2025-06-28 22:07:32 25.05.20250424.f771eb4 6.12.24 *

This commit is contained in:
2025-06-28 22:08:14 -04:00
parent f165b550e8
commit ad952f7225
4 changed files with 23 additions and 2 deletions

20
home/scripts/fullclip.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
tmpfile=$(mktemp)
trap 'rm -f "$tmpfile"' EXIT
if (( $# == 0 )); then
printf 'usage: %s command [arg …] — or — %s "full pipeline"\n' "$0" "$0" >&2
exit 1
fi
if (( $# == 1 )); then
bash -c "$1" >"$tmpfile"
else
"$@" >"$tmpfile"
fi
data=$(cat "$tmpfile")
op="$*"
echo -e "\$ $op\n$data" | perl -p -e 'chomp if eof' | xclip -in -sel clip
rm "$tmpfile"