authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-06-05 01:39:18 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-06-05 01:39:18 -07:00
logcf43dd6c9f328073f7468b5341c69ed0bb185db3
tree02f83200e253bab166348d0c24b81542c5422409
parent9e1d873db79e9ffa6ae6e06bd372428c9be85d97

remove nektro/zig-range


2 files changed, 1 insertions(+), 3 deletions(-)

src/lib.zig+1-2
...@@ -1,6 +1,5 @@...@@ -1,6 +1,5 @@
1const std = @import("std");1const std = @import("std");
2const ansi = @import("ansi");2const ansi = @import("ansi");
3const range = @import("range").range;
43
5pub fn answer(out: anytype, comptime prompt: []const u8, comptime T: type, comptime valfmt: []const u8, value: T) !T {4pub fn answer(out: anytype, comptime prompt: []const u8, comptime T: type, comptime valfmt: []const u8, value: T) !T {
6 try out.print(comptime ansi.color.Fg(.Green, "? "), .{});5 try out.print(comptime ansi.color.Fg(.Green, "? "), .{});
...@@ -35,7 +34,7 @@ fn doprompt(out: anytype, in: anytype, alloc: std.mem.Allocator, default: ?[]con...@@ -35,7 +34,7 @@ fn doprompt(out: anytype, in: anytype, alloc: std.mem.Allocator, default: ?[]con
35}34}
3635
37fn clean(out: anytype, n: usize) !void {36fn clean(out: anytype, n: usize) !void {
38 for (range(n)) |_| {37 for (0..n) |_| {
39 try out.print(comptime ansi.csi.CursorUp(1), .{});38 try out.print(comptime ansi.csi.CursorUp(1), .{});
40 try out.print(comptime ansi.csi.EraseInLine(0), .{});39 try out.print(comptime ansi.csi.EraseInLine(0), .{});
41 }40 }
zig.mod-1
...@@ -5,4 +5,3 @@ license: MIT...@@ -5,4 +5,3 @@ license: MIT
5description: A collection of utilities for prompting information from the user on the CLI5description: A collection of utilities for prompting information from the user on the CLI
6dependencies:6dependencies:
7 - src: git https://github.com/nektro/zig-ansi7 - src: git https://github.com/nektro/zig-ansi
8 - src: git https://github.com/nektro/zig-range