import { default } from "https://deno.land/x/netzo@0.5.107/deps/question/password.ts";
Creates a free form text input that does not print the characters normally printed by the input
prompt. The characters are substituted for a substitute string you can provide. If the substitute
parameter is a boolean false no substitute characters will be printed.
The substitute string if longer than 1 character can be called a pattern and will also be printed
in that pattern. So if you have a pattern of <>
and that length of the text i 5 the substitution
will look like <><><
.
Controls:
Ctrl+c
will have the question canceled and returnundefined
.Ctrl+d
will exit the whole script no questions asked with aDeno.exit()
.Up
arrow orHome
key will move the cursor to the start of the prompt text.Down
arrow orEnd
key will move the cursor to the end of the prompt text.Left
arrow will move the cursor one step to the left once if able.Right
arrow will move the cursor one step to the right once if able.Enter
will return the test inputted or the provided default value.
Requires --unstable
until Deno version 1.27.