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

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

Re: password shows on emacs as a shell


From: Peter Weiss, Sun Microsystems, Germany
Subject: Re: password shows on emacs as a shell
Date: Tue, 05 Nov 2002 17:46:50 +0100
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8)

>>>>> On 5 Nov 2002 08:33:56 -0800, kirpi@tiscali.it (Luigi) said:

Luigi> I run Linux SuSE 8.0 and try Emacs as a unix shell.
Luigi> The bad thing is that as "su -", emacs shows the password while I type 
it.
Luigi> Not so nice.
Luigi> What do you think, please?

Put the following in your .emacs:

  (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt)

>From the documentation:

  comint-watch-for-password-prompt is a compiled Lisp function in `comint'.
  (comint-watch-for-password-prompt STRING)

  Prompt in the minibuffer for password and send without echoing.
  This function uses `send-invisible' to read and send a password to the 
buffer's
  process if STRING contains a password prompt defined by
  `comint-password-prompt-regexp'.


    Hth -- Peter

-- 
Consultant der CLASS AG   http://www.class.de
Professional Services
mobil +49 (0) 172/837 91 25
mailto:Peter.Weiss@class.de


reply via email to

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