ask-cli

Crates.ioask-cli
lib.rsask-cli
version0.3.0
sourcesrc
created_at2022-10-30 22:25:35.27001
updated_at2024-02-16 04:34:34.312566
descriptionAsk CLI offers a simple way to ask a yes or no question.
homepage
repositoryhttps://github.com/SUPERCILEX/ask-cli
max_upload_size
id701695
size51,298
Alex Saveau (SUPERCILEX)

documentation

README

Ask CLI

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".

Installation

Use prebuilt binaries

Binaries for a number of platforms are available on the release page.

Build from source

$ cargo +nightly install ask-cli

To install cargo, follow these instructions.

Usage

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
Commit count: 57

cargo fmt