#cli #answer #ask #question #prompt

nightly bin+lib ask-cli

Ask CLI offers a simple way to ask a yes or no question

6 releases

0.1.5 Dec 29, 2022
0.1.4 Dec 29, 2022
0.1.2 Nov 18, 2022
0.1.1 Oct 31, 2022

#1648 in Command line utilities

32 downloads per month

Apache-2.0

17KB
173 lines

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

No runtime deps