deno-cliffy
deno-cliffy copied to clipboard
Prefill and edit prompt?
I'm not seeing a way to prefill a prompt with text that the user can edit. Is this something that cliffy supports?
Currently you can only define a default value but it doesn't fill the input.
const name: string = await Input.prompt({
message: "Whats your name?",
default: "Foo",
});
? What's your name? (Foo) ›
One way to add support for this could be to fill the input with the default value when pressing tab. The easiest way to implement this could be to add the default value as first entry to the suggestions list.