Merge pull request #46001 from uskudnik/add-hcloud-autocomplete-support
hcloud: Add autocomplete support for bash and zsh
This commit is contained in:
commit
d5e854b646
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user