From: Ian Johnson <ianprime0509@gmail.com>
To: 29729@debbugs.gnu.org
Subject: bug#29729: [PATCH] Support French password prompts in shell
Date: Fri, 15 Dec 2017 21:19:10 -0500 [thread overview]
Message-ID: <87lgi3mn35.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
I noticed that French password prompts in `shell-mode' weren't detected
as such by `comint-watch-for-password-prompt' due to a space between the
password prompt and the colon (as in `Mot de passe :'), so I modified
`comint-password-prompt-regexp' to detect this space (as well as
non-breaking spaces before and after the colon, which is used by sudo).
Please let me know if I missed anything, as this is my first patch.
Thank you!
[-- Attachment #2: Patch for French password prompt detection --]
[-- Type: text/x-patch, Size: 1313 bytes --]
From 0d6d4e79e8fe94ae2f7424c2fac1b50b49d891d6 Mon Sep 17 00:00:00 2001
From: Ian Johnson <ianprime0509@gmail.com>
Date: Fri, 15 Dec 2017 21:03:22 -0500
Subject: [PATCH] Support French password prompts in shell
French punctuation rules require a space (preferably non-breaking)
before the colon, but password prompts following this rule were not
identified properly by `comint-watch-for-password-prompt'.
* lisp/comint.el (comint-password-prompt-regexp): support
spaces (including non-breaking spaces) before and after password
prompt colon.
---
lisp/comint.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/comint.el b/lisp/comint.el
index aa7dab28f3..414ffd0f49 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -363,7 +363,7 @@ comint-password-prompt-regexp
"\\(?:" (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:]]+ .+\\)?[::៖]\\s *\\'")
+ "\\(?: [[:alpha:]]+ .+\\)?[\\s ]*[::៖][\\s ]*\\'")
"Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
:version "26.1"
--
2.15.1
next reply other threads:[~2017-12-16 2:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-16 2:19 Ian Johnson [this message]
2017-12-22 14:13 ` bug#29729: [PATCH] Support French password prompts in shell Eli Zaretskii
2018-08-16 0:30 ` Noam Postavsky
2018-08-16 13:27 ` Eli Zaretskii
2018-08-24 11:49 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgi3mn35.fsf@gmail.com \
--to=ianprime0509@gmail.com \
--cc=29729@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).