1
0
Fork 0
dotfiles/bin/passget
2018-10-17 17:38:56 -07:00

15 lines
251 B
Bash
Executable file

#!/bin/bash
if [ -z "$1" ]; then
echo 'Nothing to get'
exit 1
fi
set -euo pipefail
contents=$(gopass show "$1") || exit 1
echo "$contents" | grep '^user:' | cut -d' ' -f2 | xsel -b
echo 'Username clipped'
read -r _
gopass show --clip "$1"