Post AblIlHomyTm0XXF8IC by defanor@emacs.ch
(DIR) More posts by defanor@emacs.ch
(DIR) Post #AblANlH50QBtJVkOsi by galdor@emacs.ch
2023-11-13T09:38:15Z
0 likes, 0 repeats
Password prompts in command line programs should always be prefixed with the name of the program: if a scripts execute several programs asking for a password, you need to know which one is asking. Sudo does it correctly. GPG does not.
(DIR) Post #AblIlHomyTm0XXF8IC by defanor@emacs.ch
2023-11-13T11:12:08Z
0 likes, 0 repeats
@galdor On the one hand, it makes sense; on the other, it would make sense for pretty much any potentially confusing mixed output and input, and the confusion may arise not just between different programs, but also different processes, sessions, commands, etc. I guess proper multiplexing may better be handled by a program mixing them together (such as a shell script) at that point, with "| sed -e 's/^/foo: /'" or something along those lines. I.e., if you (as a program, a shell script) mix them together, it is also your responsibility to make them distinguishable, if that matters.
(DIR) Post #AblLnjc0uLyzBP7uWe by galdor@emacs.ch
2023-11-13T11:46:11Z
0 likes, 0 repeats
@defanor Altering the content of the output streams is not that simple (quick, how do you buffer/remux stdout and stderr?) and would potentially affect any script relying on this output.Not knowing which program you are entering a password for is a serious problem with a simple solution for programs which care.