Skip to content

Instantly share code, notes, and snippets.

@terabyte
Created September 29, 2017 20:35
Show Gist options
  • Save terabyte/ccdfd2fd9d3035d0d9ba460bda7eb298 to your computer and use it in GitHub Desktop.
Save terabyte/ccdfd2fd9d3035d0d9ba460bda7eb298 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
FILE="$HOME/.tmux.copybuffer"
scratch=$(mktemp -t tmp.XXXXXXXXXX)
function finish {
rm -rf "$scratch"
}
trap finish EXIT
# load some passwords into my tmux buffer so they are already there.
cat $FILE | while read line; do
echo -n $line > $scratch
tmux load-buffer $scratch
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment