diff --git a/docs/assets/terminal-demo.gif b/docs/assets/terminal-demo.gif index 5827bcc..485aa7d 100644 Binary files a/docs/assets/terminal-demo.gif and b/docs/assets/terminal-demo.gif differ diff --git a/src/cli.zig b/src/cli.zig index b1a3b76..e3de86d 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -59,7 +59,7 @@ pub fn parse(args: anytype) Action { pub fn writeHelp(writer: anytype) !void { try writer.writeAll( - color.bright_cyan ++ "Package Version Info" ++ color.reset ++ + "\n" ++ color.bright_cyan ++ "Package Version Info" ++ color.reset ++ "\n\n" ++ color.yellow ++ "Usage:" ++ color.reset ++ "\n package-version-info [options]" ++ "\n\n" ++ color.yellow ++ "Options:" ++ color.reset ++ @@ -75,7 +75,7 @@ pub fn writeHelp(writer: anytype) !void { " Output TypeScript file (default: version-info.ts)." ++ "\n " ++ color.green ++ "-g, --git " ++ color.reset ++ " Git directory (default: .git)." ++ - "\n", + "\n\n", ); } @@ -173,6 +173,8 @@ test "help contains usage commands and options" { try writeHelp(&output.writer); const help = output.writer.buffered(); + try std.testing.expect(std.mem.startsWith(u8, help, "\n")); + try std.testing.expect(std.mem.endsWith(u8, help, "\n\n")); try std.testing.expect(std.mem.indexOf(u8, help, "Usage:") != null); try std.testing.expect(std.mem.indexOf(u8, help, "Options:") != null); try std.testing.expect(std.mem.indexOf(u8, help, "Commands:") == null);