I tried using attic with a passphrase to backup my files from inside
M-x shell. The shell exposed the passphrase as plain text in the buffer and made it available by typing
M-r as well as by looking through the shell input history with
When I closed the shell and re-opened the input history, I saw that at least it disappeared. Presumably, because the shell reads it's initial history from
.bash_history and at least
bash had the good sense not to write my
Do I really need to leave
emacs to perform my
attic backups, or is there a way I can configure it not to be careless?
I was able to reproduce the issue with a fresh
emacs -Q session. I was confused before because Emacs correctly hides the passphrase in all cases except when I call
attic create --stats /path/to/backup::name ~/folders ~/backed ~/up
attic prompts as:
Enter passphrase for /path/to/backup::name:
The issue can be reproduced with this Python one-liner:
python -c 'import getpass; getpass.getpass("Hello")'
If the password prompt string is
"Password:" then Emacs sees a password prompt, but not if the string is anything else.
How can I make Emacs recognize at least attic's password prompts?