help-gnu-emacs
[Top][All Lists]
Advanced

[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: Thu, 31 Jan 2008 19:28:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

David <dpleydel@univ-fcomte.fr> writes:

>> >> 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.
>> 
>> I have tested it in ubuntu and here in gentoo
>> Tramp prompt, sudo are not affected, it work.
>> 
>> So here to have password hidden with french prompt:
>> 
>> (setq comint-password-prompt-regexp 
>>       "\\(\\(\\(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 *\\'")
>> 
>> Thank you for your help.
>  
> Hi Thierry
>
> Thaks for going into such depth, you guys are going way deeper than I
> am able to here. Unfortunately this doesn't work in my *shell*, I
> still see the characters typed at the password: prompt. But I don't
> mind. I love the M-x term for running mutt and M-x eshell seems very
> cool for super user tasks, unlike the terminal emulator you don't
> loose the emacs functionality.
>
> I have one small proble with the eshell, after running su my promt is
> a bit naff.
>
> ~ $ su
> Password: 
> dell-1 /home/dave # 
>
> What options are there for having a nicer prompt in eshell? It would
> be nice to show the path in the prompt when the path is short or
> abreviate the path in the prompt when the path is long. Am I dreaming?

Is it what you need ?

(setq eshell-output-filter-functions (list 'eshell-handle-ansi-color 
                                           'eshell-handle-control-codes 
                                           'eshell-watch-for-password-prompt))


-- 
A + Thierry
Pub key: http://pgp.mit.edu




reply via email to

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