refactor: add a little flair
This commit is contained in:
parent
4569a33382
commit
9dda7efc25
1 changed files with 4 additions and 2 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue