authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-10-27 03:13:54 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-10-27 03:13:54 -07:00
log504a3309b72f03838bb7d22d59b9f9c5dd1f26e6
tree335e3185ae435404ad0194945ca00099b338cc8c
parent47e4db9832c857c9c030595d44c4f4ccb1ce70a6

allow the default forString value to be empty string


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

src/lib.zig+1-1
...@@ -80,7 +80,7 @@ pub fn forString(out: anytype, in: anytype, comptime prompt: []const u8, alloc:...@@ -80,7 +80,7 @@ pub fn forString(out: anytype, in: anytype, comptime prompt: []const u8, alloc:
80 try out.print(comptime ansi.color.Fg(.Green, "? "), .{});80 try out.print(comptime ansi.color.Fg(.Green, "? "), .{});
81 try out.print(comptime ansi.color.Bold(prompt ++ " "), .{});81 try out.print(comptime ansi.color.Bold(prompt ++ " "), .{});
8282
83 if (default != null) {83 if (default != null and default.?.len > 0) {
84 try out.print(ansi.style.Faint ++ "(", .{});84 try out.print(ansi.style.Faint ++ "(", .{});
85 try out.print("{s}", .{default.?});85 try out.print("{s}", .{default.?});
86 try out.print(")" ++ ansi.style.ResetIntensity ++ " ", .{});86 try out.print(")" ++ ansi.style.ResetIntensity ++ " ", .{});