This document is a list of implementation examples for Promptuity.
This is a quick start implementation. It demonstrates the most basic usage of Promptuity.
$ cargo run --example quick_start
This is a sample of the basic usage of built-in prompts.
$ cargo run --example prompt_input
$ cargo run --example prompt_password
$ cargo run --example prompt_number
$ cargo run --example prompt_select
$ cargo run --example prompt_multi_select
$ cargo run --example prompt_confirm
This is an implementation example of handling prompt interruptions.
$ cargo run --example error_handling
This is a reference implementation of Autocomplete
. It is useful for deepening understanding in the following areas:
- Implementing custom prompts
- Handling user input (Input)
- Displaying multiple items (Body)
$ cargo run --example autocomplete
Of course, you can also copy and paste this reference implementation to adapt it for your project.
This is an example of extending built-in prompts and customizing key bindings and rendering.
$ cargo run --example extend_prompt
This is an example of customizing the format of built-in prompts.
$ cargo run --example custom_format
This is a reference implementation example of an original Theme.
$ cargo run --example custom_theme
This is an implementation example that mimics version bumping in a Monorepo. It aids in understanding realistic use cases.
$ cargo run --example packages
This is an implementation example of a survey using the FancyTheme
.
$ cargo run --example survey_fancy
This is an implementation example of a survey using the MinimalTheme
.
$ cargo run --example survey_minimal