I want to generate a very safe password with gpg with 24+ characters. As it would be very cumbersome to write down the output, I was wondering if there is a way to copy it to the clipboard without leaving any trace, i.e. without any potential attacker being able to retrieve that information. In that same vein, is there a way to retrieve command line outputs by an attacker and, if so, is there a way to thwart these attempts ?
Reacting to the admittedly poignant and relevant criticisms in the comment section, I rephrase the question like this:
I want to find a way to secure my every move digitally. I figured that the best way to this is to generate secure passwords and to administer them in password managers. However, the longer the password and the more one has of them, the more burdensome it gets to copy them manually. But if after generating them on the command line and copying them to the clipboard, an attacker can get hold of them by simply installing a clipboard history manager, the whole point of doing this is moot. So the question really is how to safely generate passwords and transfer them to a manager without exposing oneself to this kind of danger.