dasel: add shell completions to output
This commit is contained in:
parent
99d4bf7bab
commit
73d24f8aac
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, installShellFiles
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
|
@ -20,6 +21,15 @@ buildGoModule rec {
|
||||||
"-s" "-w" "-X github.com/tomwright/dasel/v2/internal.Version=${version}"
|
"-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;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
runHook preInstallCheck
|
runHook preInstallCheck
|
||||||
|
|
Loading…
Reference in a new issue