From e8042b10f2e14187bed8ffb74b2a38a473260250 Mon Sep 17 00:00:00 2001 From: Jennings Zhang Date: Fri, 14 Mar 2025 11:48:01 -0400 Subject: [PATCH] kubecolor: add enableZshIntegration option for completion --- modules/programs/kubecolor.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/programs/kubecolor.nix b/modules/programs/kubecolor.nix index bf22232f1..52bef5bec 100644 --- a/modules/programs/kubecolor.nix +++ b/modules/programs/kubecolor.nix @@ -25,6 +25,9 @@ in { ''; }; + enableZshIntegration = + lib.hm.shell.mkZshIntegrationOption { inherit config; }; + settings = mkOption { type = yamlFormat.type; default = { }; @@ -90,5 +93,8 @@ in { home.shellAliases = lib.mkIf (cfg.enableAlias && (cfg.package != null)) { kubectl = lib.getExe cfg.package; }; + + programs.zsh.initContent = + lib.mkIf cfg.enableZshIntegration "compdef kubecolor=kubectl"; }; }