From 559d566e87bc395197d76b2aa1a4f786d7b7b3d7 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 11 Feb 2022 07:02:08 +1000 Subject: [PATCH] talosctl: install completion --- .../networking/cluster/talosctl/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/talosctl/default.nix b/pkgs/applications/networking/cluster/talosctl/default.nix index e9202205ea9a..675bbe2ca7fa 100644 --- a/pkgs/applications/networking/cluster/talosctl/default.nix +++ b/pkgs/applications/networking/cluster/talosctl/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "talosctl"; @@ -33,6 +33,15 @@ buildGoModule rec { subPackages = [ "cmd/talosctl" ]; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd talosctl \ + --bash <($out/bin/talosctl completion bash) \ + --fish <($out/bin/talosctl completion fish) \ + --zsh <($out/bin/talosctl completion zsh) + ''; + doCheck = false; meta = with lib; {