[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mysterious hidden end of line characters.
From: |
Thierry Volpiatto |
Subject: |
Re: Mysterious hidden end of line characters. |
Date: |
Sat, 02 Feb 2008 15:18:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 31.01.2008 um 11:20 schrieb Thierry Volpiatto:
>
>> The problem is when locale is french or else maybe, the regex that
>> match "Mot de passe :" don't exist.
>
> Could be this works:
>
> "\\(\\(\\(Enter \\|[Oo]ld \\|[Nn]ew \\|'s \\|login \\|Kerberos
> \\|
> CVS \\|UNIX \\| SMB \\|LDAP \\|\\[sudo] \\|^\\)[Pp]assword\\( (again)\
> \)?\\|pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\\
> (?:, try again\\)\\|Mot de passe \\)?\\(?: for [^:]+\\)?:\\s *\\'"
>
>
> It's a very complicated structure that takes into account that you
> might fail to enter correctly a Kerberos, or CVS, or SMB, or LDAP
> password, some pass phrase, and I don't know what else.
>
> Forgetting all this troublesome stuff, just describe another option
>
> \\|Mot de passe
>
> with a final SPC that is then followed by
>
> ?\\(?: for [^:]+\\)
>
> so you have to put everything before this expression into a froup with
> \\(...\\). Or this is more correct?
>
> "\\(\\(\\(Enter \\|[Oo]ld \\|[Nn]ew \\|'s \\|login \\|Kerberos
> \\|
> CVS \\|UNIX \\| SMB \\|LDAP \\|\\[sudo] \\|^\\)[Pp]assword\\( (again)\
> \)?\\|pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\\
> (?:, try again\\)?\\(?: for [^:]+\\)\\|Mot de passe \\)?:\\s *\\'"
>
> Mostly guessing, not completely understanding.
As you warn me at the start of this post,
i have strange effect with this regex:
when i do tar command i have a prompt like "tar: "
when i launch a script python with some raw-input,
in a python-shell (ipython) the prompt is hidden like a password.
So i tried to modify the regex again:
I can have a prompt for su correct but always with side effects on
some other commands.
I think the best should be modifying bash to avoid this stupid
"Mot de passe : " and have a normal "Password: "
without modifying the locale env variables.
But i don't know where i can modify that for the moment.
If emacs is started with LC_ALL=C the prompt is "Password: "
Thats a way to do but some errors can appear on french files(not sure)
--
A + Thierry
Pub key: http://pgp.mit.edu