From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6930 invoked by alias); 1 Feb 2011 21:22:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15750 Received: (qmail 619 invoked from network); 1 Feb 2011 21:22:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=OVlnt4KFxBafL2vFNGewLLSx9S92BJkrXnqcZxXRZF0=; b=vIlIgTLeqt0D7W5oa8qSv874epjLFWEKh5wM++6PfxHZ77Blhj2R4DYe+kvAkysdHZ Hx1PcmevyjmqMBQ99ahhLBY9wSSVUJ63Rk207C9CuuSJ44ndXgsNCG1HhG1hdAIF30RF aWHq0mJHw2Qu51Vh2HyPzGrSvMgEbnuPcNSKA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=TAJS5P/h7w0ck0lVMo0g7QEeYjMZNxVVb4pyTQUXe+L0JT4UaafHlXgkRVYFZbM5Q+ CGT2vKYdLRqUIASU8SbGZfpgt53S2n0r8BUiXDTjejarLYIUhaQQkFb7si6rYqIsZb+9 yj8OWkZKM/hn8erT4Kkd6ES8zTPQob1RyrIyE= MIME-Version: 1.0 From: Julien Nicoulaud Date: Tue, 1 Feb 2011 22:15:14 +0100 Message-ID: Subject: Commands with passwords as options To: zsh-users Content-Type: multipart/alternative; boundary=0016364eed9e866d22049b3f0825 --0016364eed9e866d22049b3f0825 Content-Type: text/plain; charset=ISO-8859-1 Some commands take passwords as option values, which is not very secure... I was wondering if there is some way to handle that, for example through a custom completer. Ideally, I here is how it should behave: - When reaching an option which expected value is a password, prompt for it and read it from stdin - Do not display it in the buffer (just replace it with "XXXX" for example) - When accepting the buffer, replace the displayed buffer with the real one - Save the displayed buffer in the history rather than the real one Does anyone have an idea on how to achieve this ? Regards, Julien --0016364eed9e866d22049b3f0825--