unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.76k stars 269 forks source link

Add support for prompts #3422

Open hojberg opened 2 years ago

hojberg commented 2 years ago

UCM could allow for some really nice UX if we supported prompts. This comes in several forms:

  1. A simple way for a user to confirm a question. This could be "download base into lib.base" or "Looks like you're pushing to a new location on Share. Do you want to create a new namespace there?"
  2. A way to collect more detailed information from the user. This could be wizard for creating an author, prompting the user for their name. Or a picklist, prompting the user to pick a license for their project.

It's a bit of an unknown, how much effort this would be to implement, so a fair amount of derisk and investigation is needed upfront.

hojberg commented 2 years ago

Note that a requirement is that prompts work in Transcripts.

runarorama commented 2 years ago

I'd prefer if yes/no prompts worked like numbered arguments: a kind of temporary state for the CLI. So instead of being modal, you just type "yes" as the next command, which gets interpreted as your having typed the suggested command. If you type any other command, the CLI just moves on.

But yeah, separately from that it would be nice to be able to prompt for an Author and License.