Subject: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents

From: Noam Postavsky <[email-masked]>
Date: Wed, 01 May 2019 08:58:33 -0400

Eric Hanchrow <[email-masked]> writes:

> Where I work, I often run a command that prompts me like this:
>
>     PIN for erichan:
>
> The current default value of comint-password-prompt-regexp doesn't hide
> my typing, but I imagine it would if "PIN" were one of the elements of
> password-word-equivalents.

Yes, I agree it makes sense to add it.

> In related news: it's surprisingly difficult to control this behavior by
> simply customizing password-word-equivalents; afaict, that variable has
> an effect only when comint.el loads, which appears to happen before my
> custom file gets loaded.

You could try loading your custom file earlier, or loading comint
later.  Otherwise, you can still avoid the extra load:

    (when (boundp 'comint-password-prompt-regexp)
      (setq password-word-equivalents
            '("PIN" "password" "passcode" "passphrase" "pass phrase"))
      ;; Reset to new standard value.
      (setq comint-password-prompt-regexp
            (eval (car (get 'comint-password-prompt-regexp 'standard-value)))))

But yeah, defcustoms with computed default values can be troublesome.