emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 00011c0 2/2: Make comint understand the ccrypt password phrases


From: Lars Ingebrigtsen
Subject: master 00011c0 2/2: Make comint understand the ccrypt password phrases
Date: Mon, 27 Sep 2021 02:15:34 -0400 (EDT)

branch: master
commit 00011c0ad28cdf1516c854e5fe088a2681aa641c
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/comint.el                  | 5 ++++-
 lisp/international/mule-conf.el | 1 +
 test/lisp/comint-tests.el       | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/comint.el b/lisp/comint.el
index 26aa554..1e5b990 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 2d36dab..9a68fce 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 4cba1e4..e1bac81 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]