Skip to main content

Module prompt

Module prompt 

Source
Expand description

Terminal questions for luxid new.

Hand-rolled rather than pulling in a prompt crate. The questions are two short multiple-choice lists, and rolling them means full control over the part that actually matters: what happens when there is no terminal.

A scaffolding tool that blocks on stdin inside a CI job, a Docker build or a shell pipeline is a scaffolding tool people stop trusting. Every prompt here is reachable only when is_interactive is true; otherwise the caller takes the default.

Functionsยง

choose
Ask a multiple-choice question, returning the index of the chosen option.
is_interactive
Whether there is a human at both ends.