The proposed solution:
> Instead of loading secrets from a file, you use a wrapper script that fetches secrets from a secure store and injects them as environment variables into your process
Now they sit "on disk" as plaintext, in /proc/self/environ, still readable by any process running as your user.
It’s a whole toolkit for this - with built in validation, type safety, and extra protection for sensitive secrets.
Usually I do ^ while setting it as a variable, then I can still save the regular command to the history without the secret.