Crates.io | ask-cli |
lib.rs | ask-cli |
version | 0.3.0 |
source | src |
created_at | 2022-10-30 22:25:35.27001 |
updated_at | 2024-02-16 04:34:34.312566 |
description | Ask CLI offers a simple way to ask a yes or no question. |
homepage | |
repository | https://github.com/SUPERCILEX/ask-cli |
max_upload_size | |
id | 701695 |
size | 51,298 |
ask
offers a simple way to ask a yes or no question on the CLI, returning exit code 0 on "yes" and 1 on "no".
Binaries for a number of platforms are available on the release page.
$ cargo +nightly install ask-cli
To install cargo, follow these instructions.
Ask the user a question:
$ ask Do you want to continue?
Do you want to continue? [Y/n] yes
$ echo $?
0
$ ask Do you want to continue?
Do you want to continue? [Y/n] n
$ echo $?
1