talosctl: install completion

This commit is contained in:
zowoq
2022-02-11 07:10:32 +10:00
parent 1d56da111b
commit 559d566e87
@@ -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; {