diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-02-11 07:02:08 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-02-11 07:10:32 +1000 |
commit | 559d566e87bc395197d76b2aa1a4f786d7b7b3d7 (patch) | |
tree | 30043bb9b503594f8f722f56e14aa75f11003852 /pkgs/applications/networking/cluster/talosctl | |
parent | 1d56da111b8b3bd6ed693133f57b9a2b4b59d511 (diff) |
talosctl: install completion
Diffstat (limited to 'pkgs/applications/networking/cluster/talosctl')
-rw-r--r-- | pkgs/applications/networking/cluster/talosctl/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/applications/networking/cluster/talosctl/default.nix b/pkgs/applications/networking/cluster/talosctl/default.nix index e9202205ea9ad..675bbe2ca7faf 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; { |