emacs shell パスワード隠蔽時の
お約束のフックがあるじゃないですか。
パスワード取得用の正規表現パターンがどっかの変数に格納されているんですけど、
何だったか思い出せないのがオヤジクオリティ。ひっさしぶりにログインした端末でみつけました。
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt)
;;(setq comint-password-prompt-regexp "\\(\\([Oo]ld \\|[Nn]ew \\|Kerberos \\|'s \\|login \\|^\\)[Pp]assword\\( (again)\\)?\\|pass phrase\\|Enter passphrase\\)\\( for [^@ \n]+@[^@ \n]+\\)?:\\s *\\'")