On Sat, 16 Mar 2024 21:26, B.S. said: > ... (Windows 10) [DOS] cmd ... [*NOT* powershell] > ... cygwin gpg ...
[Do not use a Cygwin build of gpg - this is not supported. Use a standard build for WIndows.] > How can I have gpg pause to receive its passphrase, before it starts > outputing decrypt to stdout? Due to the way a pipe works there is not much you can do here. Except for having some kind buffering tool in between. Howeverm if you known the passphrase, you can pass it to gpg directly using --passphrase-file and --pinentry-mode=loopback. > So if gpg could finish getting its passphrase from 'readline' before > opening stdout (that less then sees to clear the screen and open its The pipeline is constructed by the shell (cmd.exe) and file descriptors are given to the programs. There is nothing any of the programs can do here. In fact when using a pipeline in this way, the next program in the line should be able to handle the output of the former which means it will expect valid output. > So far: > ( gpg.exe -d somefile.gpg | jq.exe ) | less You are using a Cygwin version of the standard shell here? In this case make sure that jq.exe gets its EPIPE from the failed gpg.exe. You may consider to use gpgme-json as a higher level API to gpg. But of course it does not work the usual way in a pipe. Salam-Shalom, Werner -- The pioneers of a warless world are the youth that refuse military service. - A. Einstein
openpgp-digital-signature.asc
Description: PGP signature
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users