Skip to content

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

License

Notifications You must be signed in to change notification settings

SUPERCILEX/ask-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages