password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 8681d2000b756955f6f1a25601e0c3128691cb5c
parent 3b16d1d3fbd221724378475085a1170997d732b5
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Sun, 30 Sep 2012 18:34:32 +0200

Check error code of gpg before copying to clipboard.

Diffstat:
Msrc/password-store.sh | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/password-store.sh b/src/password-store.sh @@ -223,7 +223,9 @@ case "$command" in if [[ $clip -eq 0 ]]; then exec gpg2 -d $GPG_OPTS "$passfile" else - clip "$(gpg2 -d $GPG_OPTS "$passfile" | head -n 1)" "$path" + pass="$(gpg2 -d $GPG_OPTS "$passfile" | head -n 1)" + [[ -n $pass ]] || exit 1 + clip "$pass" "$path" fi fi ;;