svu: add shell completions (#478490)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
fetchFromGitHub,
|
||||
testers,
|
||||
svu,
|
||||
installShellFiles,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@@ -31,6 +33,14 @@ buildGoModule rec {
|
||||
rm internal/git/git_test.go
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd svu \
|
||||
--bash <($out/bin/svu completion bash) \
|
||||
--fish <($out/bin/svu completion fish) \
|
||||
--zsh <($out/bin/svu completion zsh)
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = svu; };
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user