Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jntn/sure
A command line utility to ask if you are sure. If not it will return an error code.
https://github.com/jntn/sure
Last synced: about 1 month ago
JSON representation
A command line utility to ask if you are sure. If not it will return an error code.
- Host: GitHub
- URL: https://github.com/jntn/sure
- Owner: jntn
- Created: 2015-08-29T11:22:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-29T11:49:56.000Z (over 9 years ago)
- Last Synced: 2024-11-09T18:46:24.442Z (about 2 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sure
Asks you if you are sure. If you are not, it will return an error code. Is useful in scripts where you want a confirmation before executing.For example if you have a destructive script in package.json (when using `&&` the next command wont be run if current command exits with an error code):
```json
"scripts": {
"clean": "sure && rm -rf dist",
}
```
```bash
$ npm run clean
Are you sure? [y/n]
...
```Can be invoked with your own question and allowed answer:
```bash
$ sure --question "Type ok to continue." --yes "ok"
Type ok to continue.
...
```