refactor: add a little flair

This commit is contained in:
CJ van den Berg 2026-03-07 19:24:40 +01:00
parent 4569a33382
commit 9dda7efc25
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -99,7 +99,7 @@ fn usage(out: std.fs.File) !void {
try writer.interface.print( try writer.interface.print(
\\Usage: nightwatch <path> [<path> ...] \\Usage: nightwatch <path> [<path> ...]
\\ \\
\\Watch files and directories for changes. Press Ctrl-C to stop. \\The Watch never sleeps.
\\ \\
\\Events printed to stdout: \\Events printed to stdout:
\\ create a file was created \\ create a file was created
@ -108,6 +108,8 @@ fn usage(out: std.fs.File) !void {
\\ mkdir a directory was created \\ mkdir a directory was created
\\ rename a file or directory was renamed \\ rename a file or directory was renamed
\\ \\
\\Stand down with Ctrl-C.
\\
, .{}); , .{});
try writer.interface.flush(); try writer.interface.flush();
} }
@ -160,7 +162,7 @@ pub fn main() !void {
watcher.watch(path) catch |err| { watcher.watch(path) catch |err| {
try stderr.interface.print("nightwatch: {s}: {s}\n", .{ path, @errorName(err) }); try stderr.interface.print("nightwatch: {s}: {s}\n", .{ path, @errorName(err) });
}; };
try stderr.interface.print("watching: {s}\n", .{path}); try stderr.interface.print("on watch: {s}\n", .{path});
} }
if (builtin.os.tag == .linux) { if (builtin.os.tag == .linux) {