doctl: install shell completion

wip/yesman
zowoq 4 years ago
parent e6d4b95fed
commit dcbe2aa300
  1. 12
      pkgs/development/tools/doctl/default.nix

@ -1,4 +1,4 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
buildGoPackage rec {
pname = "doctl";
@ -16,6 +16,16 @@ buildGoPackage rec {
-X ${goPackagePath}.Label=release
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
export HOME=$(mktemp -d) # attempts to write to /homeless-shelter
for shell in bash fish zsh; do
$bin/bin/doctl completion $shell > doctl.$shell
installShellCompletion doctl.$shell
done
'';
src = fetchFromGitHub {
owner = "digitalocean";
repo = "doctl";

Loading…
Cancel
Save