Unverified Commit d8239f70 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

auth0-cli: install shell completion (#396185)

parents dd396646 2b918a01
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
  lib,
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
  stdenv,
}:

buildGoModule rec {
@@ -34,6 +36,15 @@ buildGoModule rec {
      --replace-fail "TestFetchUniversalLoginBrandingData" "SkipFetchUniversalLoginBrandingData"
  '';

  nativeBuildInputs = [ installShellFiles ];

  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd auth0 \
      --bash <($out/bin/auth0 completion bash) \
      --fish <($out/bin/auth0 completion fish) \
      --zsh <($out/bin/auth0 completion zsh)
  '';

  subPackages = [ "cmd/auth0" ];

  meta = with lib; {