Merge pull request #241128 from foo-dogsquared/add-dasel-shell-completions

dasel: add shell completions to output
This commit is contained in:
0x4A6F
2023-07-08 15:55:53 +02:00
committed by GitHub
+10
View File
@@ -1,6 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
@@ -20,6 +21,15 @@ buildGoModule rec {
"-s" "-w" "-X github.com/tomwright/dasel/v2/internal.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd dasel \
--bash <($out/bin/dasel completion bash) \
--fish <($out/bin/dasel completion fish) \
--zsh <($out/bin/dasel completion zsh)
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck