| ... | ... | @@ -1,23 +1,27 @@ |
| 1 | 1 | # zig-inquirer |
| 2 | 2 | |
| 3 |  |
| 4 | [](https://github.com/nektro/zig-inquirer/blob/master/LICENSE) |
| 5 | [](https://github.com/sponsors/nektro) |
| 6 | [](https://ziglang.org/) |
| 7 | [](https://github.com/nektro/zigmod) |
| 8 | |
| 3 | 9 | A collection of utilities for prompting information from the user on the CLI |
| 4 | 10 | |
| 5 | 11 | Adapted from https://github.com/SBoudrias/Inquirer.js |
| 6 | 12 | |
| 7 | | ## Add me |
| 8 | | ``` |
| 9 | | zigmod aq add 1/nektro/inquirer |
| 10 | | ``` |
| 11 | | |
| 12 | 13 | ## Run example |
| 14 | |
| 13 | 15 | ``` |
| 14 | 16 | zig build run |
| 15 | 17 | ``` |
| 16 | 18 | |
| 17 | 19 | ## Screenshots |
| 20 | |
| 18 | 21 |  |
| 19 | 22 | |
| 20 | 23 | ## Usage |
| 24 | |
| 21 | 25 | - `pub fn answer(writer, reader, comptime prompt: []const u8, value: []const u8) []const u8` |
| 22 | 26 | - Prints just the done string. |
| 23 | 27 | - `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 |
| 28 | 32 | - Calls `forEnum` with `y/n` |
| 29 | 33 | |
| 30 | 34 | ## TODO |
| 35 | |
| 31 | 36 | - number (current implementation causes compiler crash) |
| 32 | 37 | - list with strings |
| 33 | 38 | - string password |
| 34 | 39 | - long list with autocomplete |
| 35 | 40 | - date |
| 36 | 41 | - time |
| 37 | | |
| 38 | | ## License |
| 39 | | MIT |