zitadel-tools: add tab-completions
This commit is contained in:
parent
7b035d5c62
commit
13dd75b001
1 changed files with 11 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, installShellFiles
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
|
@ -14,6 +15,8 @@ buildGoModule rec {
|
||||||
hash = "sha256-r9GEHpfDlpK98/dnsxjhUgWKn6vHQla8Z+jQUVrHGyo=";
|
hash = "sha256-r9GEHpfDlpK98/dnsxjhUgWKn6vHQla8Z+jQUVrHGyo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
vendorHash = "sha256-y2PYj0XRSgfiaYpeqAh4VR/+NKUPKd1c0w9pPCWsUrY=";
|
vendorHash = "sha256-y2PYj0XRSgfiaYpeqAh4VR/+NKUPKd1c0w9pPCWsUrY=";
|
||||||
|
|
||||||
ldflags = [
|
ldflags = [
|
||||||
|
@ -21,6 +24,14 @@ buildGoModule rec {
|
||||||
"-X main.version=${version}"
|
"-X main.version=${version}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
local INSTALL="$out/bin/zitadel-tools"
|
||||||
|
installShellCompletion --cmd zitadel-tools \
|
||||||
|
--bash <($out/bin/zitadel-tools completion bash) \
|
||||||
|
--fish <($out/bin/zitadel-tools completion fish) \
|
||||||
|
--zsh <($out/bin/zitadel-tools completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Helper tools for zitadel";
|
description = "Helper tools for zitadel";
|
||||||
homepage = "https://github.com/zitadel/zitadel-tools";
|
homepage = "https://github.com/zitadel/zitadel-tools";
|
||||||
|
|
Loading…
Reference in a new issue