authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 13:30:49 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 13:30:49 -07:00
log3bee7b28a37f3d0898119ef095687467fa907d4b
treef15420bca3cfa3dc05be94f4639b54eb2db51a5b
parente536253dfa273852a2a4918ab806aa91e3f68c70

ziginfra README sync


1 files changed, 10 insertions(+), 8 deletions(-)

README.md+10-8
......@@ -1,23 +1,27 @@
11# zig-inquirer
22
3![loc](https://sloc.xyz/github/nektro/zig-inquirer)
4[![license](https://img.shields.io/github/license/nektro/zig-inquirer.svg)](https://github.com/nektro/zig-inquirer/blob/master/LICENSE)
5[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro)
6[![Zig](https://img.shields.io/badge/Zig-0.14-f7a41d)](https://ziglang.org/)
7[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)
8
39A collection of utilities for prompting information from the user on the CLI
410
511Adapted from https://github.com/SBoudrias/Inquirer.js
612
7## Add me
8```
9zigmod aq add 1/nektro/inquirer
10```
11
1213## Run example
14
1315```
1416zig build run
1517```
1618
1719## Screenshots
20
1821![image](https://user-images.githubusercontent.com/5464072/127479686-fda8f860-a705-4fd6-9768-a3e1f53a6bc7.png)
1922
2023## Usage
24
2125- `pub fn answer(writer, reader, comptime prompt: []const u8, value: []const u8) []const u8`
2226 - Prints just the done string.
2327- `pub fn forEnum(writer, reader, comptime prompt: []const u8, alloc: *std.mem.Allocator, comptime options: enum, default: ?options) !options`
......@@ -28,12 +32,10 @@ zig build run
2832 - Calls `forEnum` with `y/n`
2933
3034## TODO
35
3136- number (current implementation causes compiler crash)
3237- list with strings
3338- string password
3439- long list with autocomplete
3540- date
3641- time
37
38## License
39MIT