From e6c3828504f80e076630aa5c74569c584df48eaf Mon Sep 17 00:00:00 2001 From: drduh Date: Tue, 26 Mar 2024 15:57:33 -0700 Subject: [PATCH] Fix clip functionality --- .gitignore | 2 +- purse.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 780a118..f5fe9d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ purse.*.tar -purse.index +purse.index* safe/ diff --git a/purse.sh b/purse.sh index 279a359..3052c5e 100755 --- a/purse.sh +++ b/purse.sh @@ -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 }