import { default } from "https://deno.land/x/netzo@0.5.107/deps/question/input.ts";
Create a generic text input question requesting the user to input text in a free form format. A default value can be provided and if the free form text input is blank that value will be used instead.
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.