aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorFollieHiyuki <folliekazetani@protonmail.com>2021-03-16 18:16:47 +0300
committerIsaac Freund <ifreund@ifreund.xyz>2021-03-16 17:38:21 +0100
commit8627a2fefffaf0195c0e1d85b899d95e3ae5e851 (patch)
tree5cc0b04d099f455f4b343c2c2189fc02dd732633 /build.zig
parentbd604b0f47e46095e8dd6cb131c017689ab1e341 (diff)
downloadriver-8627a2fefffaf0195c0e1d85b899d95e3ae5e851.tar.gz
river-8627a2fefffaf0195c0e1d85b899d95e3ae5e851.tar.xz
riverctl: add fish completion
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 3ea4ff6..d1aa483 100644
--- a/build.zig
+++ b/build.zig
@@ -37,6 +37,12 @@ pub fn build(b: *zbs.Builder) !void {
"Set to true to install zsh completion for riverctl. Defaults to true.",
) orelse true;
+ const fish_completion = b.option(
+ bool,
+ "fish-completion",
+ "Set to true to install fish completion for riverctl. Defaults to true.",
+ ) orelse true;
+
const examples = b.option(bool, "examples", "Set to true to build examples") orelse false;
const resolved_prefix = try std.fs.path.resolve(b.allocator, &[_][]const u8{b.install_prefix.?});
@@ -114,6 +120,13 @@ pub fn build(b: *zbs.Builder) !void {
);
}
+ if (fish_completion) {
+ b.installFile(
+ "completions/fish/riverctl.fish",
+ "share/fish/vendor_completions.d/riverctl.fish",
+ );
+ }
+
if (examples) {
inline for (.{ "status", "options" }) |example_name| {
const example = b.addExecutable(example_name, "example/" ++ example_name ++ ".zig");