kub3d: add shell completions

This commit is contained in:
David Arnold 2020-07-22 20:03:06 -05:00
parent 8edebc80d6
commit 7f8171b2b6
No known key found for this signature in database
GPG key ID: 6D6A936E69C59D08

View file

@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "kube3d";
@ -22,6 +22,14 @@ buildGoModule rec {
-X github.com/rancher/k3d/v3/version.K3sVersion=v${k3sVersion}
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash zsh; do
$out/bin/k3d completion $shell > k3d.$shell
installShellCompletion k3d.$shell
done
'';
vendorSha256 = null;
meta = with stdenv.lib; {