kubecolor: add enableZshIntegration option for completion

This commit is contained in:
Jennings Zhang
2025-03-14 11:48:01 -04:00
committed by Austin Horstman
parent 5a6e5a59a4
commit e94ec0a6cd

View File

@@ -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";
};
}