Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Commands with passwords as options
- X-seq: zsh-users 15750
- From: Julien Nicoulaud <julien.nicoulaud@xxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxx>
- Subject: Commands with passwords as options
- Date: Tue, 1 Feb 2011 22:15:14 +0100
- 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=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author