bash$ gpg --batch --edit-key alice quit >/dev/null 2>&1 Secret key is available. pub 2048R/9F07612A created: 2017-06-20 expires: never usage: SCEA trust: ultimate validity: ultimate sub 2048R/23B3A24B created: 2017-06-20 expires: never usage: SEA [ultimate] (1). alice (alice's key) <firstname.lastname@example.org>
I know that using
--batch will do the job.
But my question is more "how does GnuPG achieves this 'output anyway' feature"?