common: remove support for positional arguments

This is currently unused and I don't like the approach anymore
regardless. If/when we need positional arguments (probably when
implementing the upcoming river-control protocol in rivertile)
they should be handled separately from flags.

This commit also improves the CLI error reporting to always print the
usage string if invalid arguments were passed.
This commit is contained in:
Isaac Freund
2021-07-24 18:29:48 +02:00
parent f6fa3425de
commit a5a505ecba
5 changed files with 161 additions and 185 deletions

View File

@ -116,7 +116,7 @@ pub fn build(b: *zbs.Builder) !void {
rivertile.step.dependOn(&scanner.step);
rivertile.addPackage(scanner.getPkg());
rivertile.addPackagePath("args", "common/args.zig");
rivertile.addPackagePath("flags", "common/flags.zig");
rivertile.linkLibC();
rivertile.linkSystemLibrary("wayland-client");
@ -209,7 +209,7 @@ fn addServerDeps(exe: *zbs.LibExeObjStep, scanner: *ScanProtocolsStep) void {
exe.addPackage(wlroots);
exe.linkSystemLibrary("wlroots");
exe.addPackagePath("args", "common/args.zig");
exe.addPackagePath("flags", "common/flags.zig");
// TODO: remove when zig issue #131 is implemented
scanner.addCSource(exe);