doctl: install shell completion
This commit is contained in:
parent
e6d4b95fed
commit
dcbe2aa300
@ -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…
Reference in New Issue
Block a user