Skip to content

Commit

Permalink
metal-cli: install completion
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Sep 21, 2022
1 parent e325cbd commit 2e6a924
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkgs/development/tools/metal-cli/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
pname = "metal-cli";
Expand All @@ -18,6 +18,15 @@ buildGoModule rec {
"-X github.com/equinix/metal-cli/cmd.Version=${version}"
];

nativeBuildInputs = [ installShellFiles ];

postInstall = ''
installShellCompletion --cmd metal \
--bash <($out/bin/metal completion bash) \
--fish <($out/bin/metal completion fish) \
--zsh <($out/bin/metal completion zsh)
'';

doCheck = false;

doInstallCheck = true;
Expand Down

0 comments on commit 2e6a924

Please sign in to comment.