1
0
Fork 0
dotfiles/bin/passget
2017-12-04 22:12:36 -08:00

13 lines
223 B
Bash
Executable file

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