Commit 31b93e82add80892ff7e9733892abac9a646c1e1

Authored by Georg Hopp
1 parent 2584dda5

Explicitly close stdout with each xclip -i call

Showing 1 changed file with 3 additions and 3 deletions
@@ -266,7 +266,7 @@ function amngradd() { @@ -266,7 +266,7 @@ function amngradd() {
266 PASSWORD="$(amngrcrypt -r "${RECIPIENT}" -- "${3}")" 266 PASSWORD="$(amngrcrypt -r "${RECIPIENT}" -- "${3}")"
267 else 267 else
268 PASSWORD="$(amngrgen -r "${RECIPIENT}")" 268 PASSWORD="$(amngrgen -r "${RECIPIENT}")"
269 - echo -n "${PASSWORD}" | gpg -dq | xclip -i 269 + echo -n "${PASSWORD}" | gpg -dq | xclip -i >&-
270 fi 270 fi
271 271
272 if [ -z "${PASSWORD}" ] 272 if [ -z "${PASSWORD}" ]
@@ -359,7 +359,7 @@ function amngrgetuser() { @@ -359,7 +359,7 @@ function amngrgetuser() {
359 if [ $STDOUT -eq 0 ] 359 if [ $STDOUT -eq 0 ]
360 then 360 then
361 sqlite3 "${DB}" <<-EOD |\ 361 sqlite3 "${DB}" <<-EOD |\
362 - awk 'NR>1{print p}{p=$0}END{ORS="";print}' | xclip -i 362 + awk 'NR>1{print p}{p=$0}END{ORS="";print}' | xclip -i >&-
363 SELECT user FROM account 363 SELECT user FROM account
364 JOIN account_cred ON account.id=account_cred.account_id 364 JOIN account_cred ON account.id=account_cred.account_id
365 JOIN cred ON cred.id=account_cred.cred_id 365 JOIN cred ON cred.id=account_cred.cred_id
@@ -411,7 +411,7 @@ function amngrgetpass() { @@ -411,7 +411,7 @@ function amngrgetpass() {
411 test "${STATE}" != "1" -a "${STATE}" != "2" && STATE="1" 411 test "${STATE}" != "1" -a "${STATE}" != "2" && STATE="1"
412 412
413 sqlite3 "${DB}" <<-EOD |\ 413 sqlite3 "${DB}" <<-EOD |\
414 - awk 'NR>1{print p}{p=$0}END{ORS="";print}' | gpg -dq | xclip -i 414 + awk 'NR>1{print p}{p=$0}END{ORS="";print}' | gpg -dq | xclip -i >&-
415 SELECT pass FROM account 415 SELECT pass FROM account
416 JOIN account_cred ON account.id=account_cred.account_id 416 JOIN account_cred ON account.id=account_cred.account_id
417 JOIN cred ON cred.id=account_cred.cred_id 417 JOIN cred ON cred.id=account_cred.cred_id
Please register or login to post a comment