uplosi: add shell completion
This commit is contained in:
parent
cf01a563f4
commit
29a3d47d2e
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, installShellFiles
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "uplosi";
|
||||
|
@ -19,6 +20,15 @@ buildGoModule rec {
|
|||
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
||||
flags = [ "-trimpath" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd uplosi \
|
||||
--bash <($out/bin/uplosi completion bash) \
|
||||
--fish <($out/bin/uplosi completion fish) \
|
||||
--zsh <($out/bin/uplosi completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Upload OS images to cloud provider";
|
||||
homepage = "https://github.com/edgelesssys/uplosi";
|
||||
|
|
Loading…
Reference in a new issue