From 7af3a0ac288611bbf09529e62a0d5c68018ef5a8 Mon Sep 17 00:00:00 2001 From: Giovanni Bassi Date: Wed, 27 Sep 2023 14:13:17 -0300 Subject: [PATCH] Add k3d spec to carapace Use it until https://github.com/rsteube/carapace-bin/issues/1864 is done. --- config/carapace/overlays/.gitkeep | 0 config/carapace/specs/k3d.yaml | 6 ++++++ configure-user-env.sh | 4 ++++ install.conf.yaml | 3 +++ 4 files changed, 13 insertions(+) create mode 100644 config/carapace/overlays/.gitkeep create mode 100644 config/carapace/specs/k3d.yaml diff --git a/config/carapace/overlays/.gitkeep b/config/carapace/overlays/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/carapace/specs/k3d.yaml b/config/carapace/specs/k3d.yaml new file mode 100644 index 0000000..077a49b --- /dev/null +++ b/config/carapace/specs/k3d.yaml @@ -0,0 +1,6 @@ +# yaml-language-server: null +--- +name: k3d +description: k3d is a wrapper CLI that helps you to easily create k3s clusters inside docker +completion: + positionalany: ["$_bridge.Cobra([k3d])"] diff --git a/configure-user-env.sh b/configure-user-env.sh index b44c691..5a85203 100755 --- a/configure-user-env.sh +++ b/configure-user-env.sh @@ -55,3 +55,7 @@ if [[ "`gpg --list-keys $keyId 2> /dev/null | grep ^uid | grep [ultimate]`" == ' rm $gpgPublicKeyFile rm $gpgOwnerTrustFile fi + +if hash carapace 2>/dev/null && ! [ -f "$HOME"/.config/carapace/schema.json ]; then + carapace _carapace > /dev/null +fi diff --git a/install.conf.yaml b/install.conf.yaml index 89a9032..820f7a8 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -8,6 +8,7 @@ - create: - ~/.cache - ~/.config + - ~/.config/carapace - ~/p - ~/bin - shell: @@ -38,6 +39,8 @@ ~/.config/starship.toml: config/starship.toml ~/.config/navi/config.yaml: config/navi-config.yaml ~/.config/nushell: nuscripts + ~/.config/carapace/specs: config/carapace/specs + ~/.config/carapace/overlays: config/carapace/overlays ~/.bashrc: path: home/.bashrc force: true