aboutsummaryrefslogtreecommitdiff
path: root/rivertile
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2021-11-01 00:34:15 +0100
committerIsaac Freund <mail@isaacfreund.com>2021-11-01 00:34:15 +0100
commitf2cf4b9455f1d80c4ba17e7717a2fc6fa809c35b (patch)
treee5b4a2652eead59be38ca674ffe1e615d1c21ac4 /rivertile
parent4cee1fb881527ebef3331424b3146a0c2ae1a769 (diff)
downloadriver-f2cf4b9455f1d80c4ba17e7717a2fc6fa809c35b.tar.gz
river-f2cf4b9455f1d80c4ba17e7717a2fc6fa809c35b.tar.xz
common: use -h instead of -help
This doesn't really matter that much as unrecognized options will still trigger a help message to be printed, but -h is much more standard so lets make the predictable choice here while sticking to only single '-' flags.
Diffstat (limited to 'rivertile')
-rw-r--r--rivertile/main.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/rivertile/main.zig b/rivertile/main.zig
index 2116341..19857c3 100644
--- a/rivertile/main.zig
+++ b/rivertile/main.zig
@@ -51,7 +51,7 @@ const flags = @import("flags");
const usage =
\\usage: rivertile [options]
\\
- \\ -help Print this help message and exit.
+ \\ -h Print this help message and exit.
\\ -version Print the version number and exit.
\\ -view-padding Set the padding around views in pixels. (Default 6)
\\ -outer-padding Set the padding around the edge of the layout area in
@@ -314,7 +314,7 @@ pub fn main() !void {
// https://github.com/ziglang/zig/issues/7807
const argv: [][*:0]const u8 = os.argv;
const result = flags.parse(argv[1..], &[_]flags.Flag{
- .{ .name = "-help", .kind = .boolean },
+ .{ .name = "-h", .kind = .boolean },
.{ .name = "-version", .kind = .boolean },
.{ .name = "-view-padding", .kind = .arg },
.{ .name = "-outer-padding", .kind = .arg },
@@ -325,7 +325,7 @@ pub fn main() !void {
try std.io.getStdErr().writeAll(usage);
os.exit(1);
};
- if (result.boolFlag("-help")) {
+ if (result.boolFlag("-h")) {
try std.io.getStdOut().writeAll(usage);
os.exit(0);
}