summaryrefslogtreecommitdiff
path: root/devdocs/elisp/reading-a-password.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/reading-a-password.html
new repository
Diffstat (limited to 'devdocs/elisp/reading-a-password.html')
-rw-r--r--devdocs/elisp/reading-a-password.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/devdocs/elisp/reading-a-password.html b/devdocs/elisp/reading-a-password.html
new file mode 100644
index 00000000..6ed773fb
--- /dev/null
+++ b/devdocs/elisp/reading-a-password.html
@@ -0,0 +1,10 @@
+ <h3 class="section">Reading a Password</h3> <p>To read a password to pass to another program, you can use the function <code>read-passwd</code>. </p> <dl> <dt id="read-passwd">Function: <strong>read-passwd</strong> <em>prompt &amp;optional confirm default</em>
+</dt> <dd>
+<p>This function reads a password, prompting with <var>prompt</var>. It does not echo the password as the user types it; instead, it echoes ‘<samp>*</samp>’ for each character in the password. If you want to apply another character to hide the password, let-bind the variable <code>read-hide-char</code> with that character. </p> <p>The optional argument <var>confirm</var>, if non-<code>nil</code>, says to read the password twice and insist it must be the same both times. If it isn’t the same, the user has to type it over and over until the last two times match. </p> <p>The optional argument <var>default</var> specifies the default password to return if the user enters empty input. If <var>default</var> is <code>nil</code>, then <code>read-passwd</code> returns the null string in that case. </p>
+</dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Reading-a-Password.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Reading-a-Password.html</a>
+ </p>
+</div>