3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #46001 from uskudnik/add-hcloud-autocomplete-support

hcloud: Add autocomplete support for bash and zsh
This commit is contained in:
Jörg Thalheim 2018-09-10 15:18:49 +01:00 committed by GitHub
commit d5e854b646
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,19 @@ buildGoPackage rec {
buildFlagsArray = [ "-ldflags=" "-w -X github.com/hetznercloud/cli/cli.Version=${version}" ];
postInstall = ''
mkdir -p \
$bin/etc/bash_completion.d \
$bin/share/zsh/vendor-completions
# Add bash completions
$bin/bin/hcloud completion bash > "$bin/etc/bash_completion.d/hcloud"
# Add zsh completions
echo "#compdef hcloud" > "$bin/share/zsh/vendor-completions/_hcloud"
$bin/bin/hcloud completion zsh >> "$bin/share/zsh/vendor-completions/_hcloud"
'';
meta = {
description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers";
homepage = https://github.com/hetznercloud/cli;