mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
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
1 changed files with 13 additions and 0 deletions
|
@ -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 a new issue