From a5a505ecbaecacbc79c515daf55ea55ab8e475f0 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sat, 24 Jul 2021 18:29:48 +0200 Subject: 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. --- build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index b792964..8dbf0bd 100644 --- a/build.zig +++ b/build.zig @@ -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); -- cgit v1.2.3