auth0-cli: install shell completion (#396185)
This commit is contained in:
@@ -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; {
|
||||
|
||||
Reference in New Issue
Block a user