From: Lars Ingebrigtsen Date: Mon, 27 Sep 2021 06:15:24 +0000 (+0200) Subject: Make comint understand the ccrypt password phrases X-Git-Tag: emacs-28.0.90~578 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=00011c0ad28cdf1516c854e5fe088a2681aa641c;p=emacs.git Make comint understand the ccrypt password phrases * lisp/comint.el (comint-password-prompt-regexp): Add the ccrypt confirmation phrase (bug#50837). * lisp/international/mule-conf.el (password-word-equivalents): Add the ccrypt phrases. --- diff --git a/lisp/comint.el b/lisp/comint.el index 26aa5547a31..1e5b990c77a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -382,7 +382,10 @@ This variable is buffer-local." "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)" "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?" ;; "[[:alpha:]]" used to be "for", which fails to match non-English. - "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'") + "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'" + ;; The ccrypt encryption dialogue doesn't end with a colon, so + ;; treat it specially. + "\\|^Enter encryption key: (repeat) *\\'") "Regexp matching prompts for passwords in the inferior process. This is used by `comint-watch-for-password-prompt'." :version "28.1" diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 2d36dab6320..9a68fce2e81 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1679,6 +1679,7 @@ for decoding and encoding files, process I/O, etc." (defcustom password-word-equivalents '("password" "passcode" "passphrase" "pass phrase" "pin" + "decryption key" "encryption key" ; From ccrypt. ; These are sorted according to the GNU en_US locale. "암호" ; ko "パスワード" ; ja diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el index 4cba1e4cf23..e1bac81a185 100644 --- a/test/lisp/comint-tests.el +++ b/test/lisp/comint-tests.el @@ -44,6 +44,9 @@ "Password (again):" "Enter password:" "Current password:" ; "passwd" (to change password) in Debian. + "Enter encryption key: " ; ccrypt + "Enter decryption key: " ; ccrypt + "Enter encryption key: (repeat) " ; ccrypt "Enter Auth Password:" ; OpenVPN (Bug#35724) "Verify password: " ; zip -e zipfile.zip ... (Bug#47209) "Mot de Passe :" ; localized (Bug#29729)