cf-terraforming: install shell completions (#334699)
Installs shell completions for cf-terraforming for convenience
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ buildGoModule, fetchFromGitHub, lib, cf-terraforming, testers }:
|
||||
{ buildGoModule, fetchFromGitHub, lib, cf-terraforming, testers, installShellFiles, stdenv }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cf-terraforming";
|
||||
@@ -23,6 +23,15 @@ buildGoModule rec {
|
||||
command = "cf-terraforming version";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)''
|
||||
installShellCompletion --cmd cf-terraforming \
|
||||
--bash <($out/bin/cf-terraforming completion bash) \
|
||||
--fish <($out/bin/cf-terraforming completion fish) \
|
||||
--zsh <($out/bin/cf-terraforming completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command line utility to facilitate terraforming your existing Cloudflare resources";
|
||||
homepage = "https://github.com/cloudflare/cf-terraforming/";
|
||||
|
||||
Reference in New Issue
Block a user