fixed list of open keys

This commit is contained in:
alterNERDtive 2022-07-19 13:30:08 +02:00
parent 4e45959e25
commit 223a32b129
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1

View file

@ -135,12 +135,13 @@ list () {
done done
echo echo
if [[ -z "$(ls -l ${_pkdir} | grep ^l)" ]] pkdir="${tempdir}/gpghome/private-keys-v1.d"
if [[ -z "$(ls -l ${pkdir} | grep ^l)" ]]
then then
echo "No open keys. Try \`gpgtool open FINGERPRINT [FINGERPRINT …]\`." echo "No open keys. Try \`gpgtool open FINGERPRINT [FINGERPRINT …]\`."
else else
echo "Currently Opened Keys:" echo "Currently Opened Keys:"
ls -l ${_pkdir} | grep ^l | awk {'print $NF'} ls -l ${pkdir} | grep ^l | awk {'print $NF'}
fi fi
} }