From: Michael Albinus Date: Tue, 3 Jun 2025 14:56:52 +0000 (+0200) Subject: Add ansible password prompts to `comint-password-prompt-regexp' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5ce83d83a49c43f303d709bc4bfbd81f786281a;p=emacs.git Add ansible password prompts to `comint-password-prompt-regexp' * lisp/comint.el (comint-password-prompt-regexp): * test/lisp/comint-tests.el (comint-testsuite-password-strings): Add ansible password prompts. (Bug#78442) (cherry picked from commit f60ad8d1e0bf3352af8f30bc4d4de25030447d3a) --- diff --git a/lisp/comint.el b/lisp/comint.el index ffecdefba4b..7bb90d76f08 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -404,6 +404,8 @@ This variable is buffer-local." (regexp-opt '("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the" "Current" + ;; Ansible. (Bug#78442) + "Vault" "SSH" "BECOME" "Enter Auth" "enter auth" "Old" "old" "New" "new" "login" "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "PEM" "SUDO" "[sudo]" "doas" "Repeat" "Bad" "Retype" "Verify") @@ -418,6 +420,8 @@ This variable is buffer-local." ;; The ccrypt encryption dialog doesn't end with a colon, so ;; treat it specially. "\\|^Enter encryption key: (repeat) *\\'" + ;; Ansible. The vault-id syntax is a guess. (Bug#78442) + "\\|^Vault password ([^@-][^@]*): \\'" ;; Default openssh format: "user@host's password:". "\\|^[^@ \t\n]+@[^@ \t\n]+'s password: *\\'" ;; openssh-8.6p1 format: "(user@host) Password:". diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el index ccec3864a8b..82b74a5f000 100644 --- a/test/lisp/comint-tests.el +++ b/test/lisp/comint-tests.el @@ -50,6 +50,10 @@ "Enter encryption key: (repeat) " ; ccrypt "Enter Auth Password:" ; OpenVPN (Bug#35724) "Verify password: " ; zip -e zipfile.zip ... (Bug#47209) + "Vault password: " ; ansible-playbook --ask-vault-pass ... (Bug#78442) + "Vault password (dev): " ; ansible-playbook --vault-id dev@prompt ... (Bug#78442) + "SSH password: " ; ansible-playbook --ask-pass playbook.yml ... (Bug#78442) + "BECOME password: " ; ansible-playbook --ask-become-pass ... (Bug#78442) "Mot de Passe :" ; localized (Bug#29729) "Passwort:") ; localized "List of strings that should match `comint-password-prompt-regexp'.")