Merge pull request #103665 from doronbehar/pkg/hetzner-kube/sh-comp

hetzner-kube: support for bash completion
This commit is contained in:
Doron Behar 2020-11-24 12:20:45 +02:00 committed by GitHub
commit 8d8532cd32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "hetzner-kube";
@ -20,6 +20,17 @@ buildGoModule rec {
-X github.com/xetys/hetzner-kube/cmd.version=${version}
'';
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
$out/bin/hetzner-kube completion bash > hetzner-kube
$out/bin/hetzner-kube completion zsh > _hetzner-kube
installShellCompletion --zsh _hetzner-kube
installShellCompletion --bash hetzner-kube
'';
meta = {
description = "A CLI tool for provisioning Kubernetes clusters on Hetzner Cloud";
homepage = "https://github.com/xetys/hetzner-kube";