Fix clip functionality

This commit is contained in:
drduh 2024-03-26 15:57:33 -07:00
parent 404d5402d1
commit e6c3828504
2 changed files with 3 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
purse.*.tar
purse.index
purse.index*
safe/

View File

@ -105,7 +105,8 @@ read_pass () {
prompt_key "password"
if [[ -s "${spath}" ]] ; then
decrypt "${spath}" || fail "Failed to decrypt ${spath}"
clip <(decrypt "${spath}" | head -1) || \
fail "Failed to decrypt ${spath}"
else fail "Secret not available"
fi
}